i am using spring boot to call a openfeign client and from the Response of that feign i need to extract some header values.how can i do that. can anybody help please. just help me wheather we can do that or not!
i am using spring boot to call a openfeign client and from the Response of that feign i need to extract some header values.how can i do that. can anybody help please. just help me wheather we can do that or not!
You can use import feign.Response as a response like:
@PostMapping("/test")
Response test(@RequestBody TestRequest testRequest);
then you can reach http header
response.headers().get(HEADER_NAME).toString();
if you want get body in this case you have to some json-string manipulation by use response.body() this page may help you for this