fix: task runner client set http header
This commit is contained in:
parent
cb52137fdb
commit
9b954e3abb
|
@ -48,6 +48,7 @@ public class TaskRunnerClient {
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
headers.add(MsHttpHeaders.OTP_TOKEN, token);
|
headers.add(MsHttpHeaders.OTP_TOKEN, token);
|
||||||
headers.add(HttpHeaders.CONTENT_TYPE, "application/json");
|
headers.add(HttpHeaders.CONTENT_TYPE, "application/json");
|
||||||
|
headers.add(HttpHeaders.ACCEPT, "application/json");
|
||||||
HttpEntity<String> httpEntity = new HttpEntity<>(headers);
|
HttpEntity<String> httpEntity = new HttpEntity<>(headers);
|
||||||
ResponseEntity<ResultHolder> entity = restTemplateWithTimeOut.exchange(u, HttpMethod.GET, httpEntity, ResultHolder.class, uriVariables);
|
ResponseEntity<ResultHolder> entity = restTemplateWithTimeOut.exchange(u, HttpMethod.GET, httpEntity, ResultHolder.class, uriVariables);
|
||||||
return entity.getBody();
|
return entity.getBody();
|
||||||
|
|
Loading…
Reference in New Issue