【发布时间】:2018-12-01 05:12:40
【问题描述】:
我收到以下异常org.springframework.web.client.HttpClientErrorException: 400 Bad Request
关于此声明final ResponseEntity<String> entity = restTemplate.getForEntity("http://localhost:12001/api/profiles/bymsisdn/0747894146", String.class);
但我正在使用 curl url -X GET "http://localhost:8001/api/profiles/bymsisdn/0747894146"
补充说明:
resttemplate = new RestTemplate(); // No Headers or extra convertors added as I think it's not required because using curl works fine
【问题讨论】:
-
这个答案可能会有所帮助; stackoverflow.com/questions/22826887/…
标签: java spring spring-rest