Using Feign @HeaderMap with Springboot 1.5.4.RELEASE does not send headers

Viewed 3577

I am trying to use feign.HeaderMap annotation to pass a map of HTTP headers in the rest request but these are appearing in the body.

Code below:

@FeignClient(name = "accounts", url = "localhost:8080") public interface AccountClient {

@RequestMapping(method = RequestMethod.GET, value = "/rest/accounts/get", produces = MediaType.APPLICATION_JSON_VALUE)
Account findOne(@RequestParam("id") String id, @HeaderMap Map headers);

}

1 Answers
Related