fix: task runner client set http header
This commit is contained in:
parent
c567ee5bb7
commit
89656beb95
|
@ -47,6 +47,7 @@ public class TaskRunnerClient {
|
||||||
String token = totpGenerator.now();
|
String token = totpGenerator.now();
|
||||||
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");
|
||||||
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