添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
String uriTemplate = "http://www.baidu.com" ; URI uri = UriComponentsBuilder.fromUriString(uriTemplate).build().toUri(); // 自定义body实体类 RequestDO requestDO = new RequestDO(); requestDO.setProcessInstanceId(String.valueOf( "1111" )); String s = JSON.toJSONString(requestDO); RequestEntity<String> requestEntity = RequestEntity.post(uri) .accept(MediaType.APPLICATION_JSON) .header( "Content-Type" , "application/json" ) .body(s); ResponseEntity<String> exchange = template.exchange(requestEntity, String.class); String body = exchange.getBody(); System.out.println(JSON.parseObject(body).toJSONString()); Mr_Morning 后台工程师 68.1k
粉丝