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#250
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#133
No content to map due to end-of-input when decoding empty returns using JacksonDecoder.
Added UnitTests to show JacksonDecoder error. Added unit test to GsonDecoder to verify behavior is as expected.
Added a check for available inputStream data before trying to read into an Object.
closes#247
Previously, the Retryer instance provided to the Builder was simply reused, but the instance keeps per-request state, causing repeatable requests to stop being retried. Fixes#236
Shows relative performance of caching various points of construction of
a Feign Api. Adds a mesobenchmark of actually performing http requests,
so that caching performance can be placed in context.
See #214
While encoding or decoding, an exception without a message can occur.
Before this change, a NPE would return as the codec exceptions null
checked the message from the cause.
Before, LBClients were created for each request, which led to issues
such as #182. Moreover, a user could not avoid using Ribbon's static
factories. Adding LBClientFactory allows users to control how Ribbon
resources are created.