Tags: ddteeter/feign
Tags
Merge pull request OpenFeign#267 from Netflix/dont-break-on-processAn… …notationOnClass Un-abstracts processAnnotationOnClass so that we don't break api
Fixes NPE when apache client rebuffers content When log level is full, the response body is rebuffered. The Apache client had a bug where it allowed `toInputStream` to return null. This fixes that bug and backfills tests for the other two clients. Fixes OpenFeign#255
Avoids InputStream.available when determining if a stream is empty InputStream.available isn't a reliable api. This uses an alternative approach, which is to read the first byte to see if it is present. This allows us to continue to avoid "No content to map due to end-of-input" errors, but in a more supportable way. Fixes OpenFeign#250
Adds base api support via single-inheritance interfaces Before this change, apis that follow patterns across a service could only be modeled by copy/paste/find/replace. Especially with a large count, this is monotonous and error prone. This change introduces support for base apis via single-inheritance interfaces. Users ensure their target interface bind any type variables and as a result have little effort to create boilerplate apis. Ex. ```java @headers("Accept: application/json") interface BaseApi<V> { @RequestLine("GET /api/{key}") V get(@param("key") String); @RequestLine("GET /api") List<V> list(); @headers("Content-Type: application/json") @RequestLine("PUT /api/{key}") void put(@param("key") String, V value); } interface FooApi extends BaseApi<Foo> { } interface BarApi extends BaseApi<Bar> { } ``` closes OpenFeign#133
PreviousNext