title: FeignClient could decode response
body: <p>I'm using FeignClient in spring boot. I have some issues.</p>
  <p>My config file is:</p>
  <pre><code>@Configuration
  @EnableFeignClients
  @Import( FeignClientsConfiguration.class )
  public class FeignConfiguration
  {
   @Bean
   public Client client()
  {
      return new ApacheHttpClient();
  }
  
  @Bean
  public FeignClientErrorDecoder errorDecoder()
     {
      return new FeignClientErrorDecoder( new FeignDecoder() );
     }
  
   }
   
  </code></pre>
  <p>FeignClient builder:</p>
  <pre><code>  public &lt;T&gt; T build( Class&lt;T&gt; clazz, String url, RequestInterceptor interceptor,   FallbackFactory&lt;T&gt; fallbackFactory )
  {
      return HystrixFeign.builder()
                         .logLevel( Logger.Level.FULL )
                         .client( client )
                         .encoder( encoder )
                         .decoder( decoder )
                         .retryer( retryer )
                         .contract( contract )
                         .errorDecoder( errorDecoder )
                         .requestInterceptor( interceptor )
                         .target( clazz, url, fallbackFactory );
  
  }
    @FeignClient( name = &quot;http-client&quot;, configuration = FeignConfiguration.class, decode404 = true, fallbackFactory = NotificationFeignFallbackFactory.class )
    public interface NotificationFeignClient
    {
      @PostMapping( produces = APPLICATION_JSON_VALUE )
      &lt;T&gt; CompletableFuture&lt;ResponseEntity&lt;?&gt;&gt; doSend( @Valid @RequestBody T data );
  
    }
  </code></pre>
  <p>When I get response , I have got exceptions like this :</p>
  <pre><code>  feign.codec.DecodeException: Error while extracting response for type                      
    [java.util.concurrent.CompletableFuture&lt;org.springframework.http.ResponseEntity&lt;?&gt;&gt;]
    and content type [application/json]; nested exception is               
    org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error:  
    Unrecognized token 'Body': was expecting (JSON String, Number, Array, Object or token 
    'null', 'true' or 'false'); nested exception is  
    com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Body': was expecting 
    (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
    at [Source: (PushbackInputStream); line: 1, column: 5]
  </code></pre>
  <p>In my case I want to parse response to CompletableFuture. How can I do it?</p>