RestTemplate 发送post请求,参数是以表单形式传递·的,有没有会的,
HttpHeaders headers=new HttpHeaders();
MultiValueMap<String,String> map=new LinkedMultiValueMap<>();
map.add("tagName",param6);
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
HttpEntity<MultiValueMap<String,String>> http=new HttpEntity<>(map,headers);
ResponseEntity<Object> response = restTemplate.postForEntity(url, http, Object.class);
System.out.println(response.getBody());
自己写了点,但是服务器里运行显示未知方法,无法获得数据