访问其他平台接口

String url = "https://ddptcs.ele-cloud.com/recipt/checkFp/"+requestMap;
HttpHeaders headers = new HttpHeaders();//header参数
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
System.out.println("请求报文:"+JSON.toJSONString(argMap));
HttpEntity request = new HttpEntity(JSON.toJSONString(argMap), headers);
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> exchange = restTemplate.exchange(url, HttpMethod.POST, request, String.class);
posted @ 2018-12-12 15:27  菜菜鸟驿站  阅读(798)  评论(0编辑  收藏  举报