...
|
...
|
@@ -114,7 +114,7 @@ public class HttpRestClientServiceImpl implements HttpRestClientService { |
|
|
@Override
|
|
|
public <T> T getWithHeaderHost(String path, Map request, Class<T> responseType) {
|
|
|
|
|
|
logger.debug("begin to do http get host. path:{}, request params:{}", path, request);
|
|
|
logger.debug("begin getWithHeaderHost. path:{}, request params:{}", path, request);
|
|
|
|
|
|
//add accept json
|
|
|
HttpHeaders headers = new HttpHeaders();
|
...
|
...
|
@@ -136,11 +136,10 @@ public class HttpRestClientServiceImpl implements HttpRestClientService { |
|
|
}
|
|
|
|
|
|
final URI getURI = builder.build().encode().toUri();
|
|
|
logger.debug("begin to do http get host. url:{}", getURI);
|
|
|
|
|
|
try {
|
|
|
HttpEntity<T> response = restTemplate.exchange(getURI, HttpMethod.GET, entity, responseType);
|
|
|
logger.debug("end to do http get. path:{}, request params:{}. response body: {}", path, request, response.getBody());
|
|
|
logger.debug("getWithHeaderHost end. path:{}, request params:{}. response body: {}", path, request, response.getBody());
|
|
|
return response.getBody();
|
|
|
} catch (Exception e) {
|
|
|
logger.error("getWithHeaderHost failed!url:"+path, e);
|
...
|
...
|
|