title: Spring Boot / FeignClient: POST Json Body
body: <p>I currently try to implement a POST call to a backend which requires me to POST json as body.</p>
  
  <p>Now I'm facing the issue that Feign does not pass the annotated Body to the backend but only empty data. </p>
  
  <p>As soon as I add a single <code>@Param</code> or a Map, those values are passed and the client works fine.</p>
  
  <p>To increase readability I'd prefer to annotate the method with the Body and get the values from my config instead of passing them as method parameter.</p>
  
  <p>The following example should work according to the Feign Documentation:</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
  @Headers("Content-Type: " + MediaType.APPLICATION_JSON_VALUE)
  @Body("%7B\n"
    + "  \"user\": \"${logintoken.user}\",\n"
    + "  \"pwd\": \"${logintoken.password}\",\n"
    + "%7D")
  String getLoginToken();
  </code></pre>