Closed bclozel closed 12 years ago
Nice update, just a question about the getEntity() name. I wonder if we should use getEntity() or getResource() ? I am 50%/50% so it is up to you to choose the right one.
Yep, getResource makes more sense.
:+1: maybe use resource() instead of getResource().
When dealing with async HTTP, request/response code can be far appart and decoupled. For me, using an API like Client.Response.jsonDeserialize can be awkward, since you may not know which content-type was used when the request was sent.
Introducing BodyReaders and BodyWriters
I know, it is JAX-RS like, but this is quite useful. RESThub's HTTP client supports JSON and XML out-of-the-box. Users can add other BodyWriters/BodyReaders to support other mediaTypes.
API changes
Response is no longer an inner class
is now:
You don't need to specify the response format to deserialize it
is now:
Bugs fixed
JSON BodyReader matches standard json and vendor content-types
XMLBodyReader matches standard xml and vendor content-types