Closed
Description
[Essentially Copied from discord]
Suppose an api call to a server results in a 204. .GET().as(MyBean.class)
tries to deserialise the body (of which is empty), resulting in an error during deserialization
What I would've expected is:
- Just don't deserialise when it's a 204 or you know the body is empty in the first place.
- Only deserialise when
.body()
is called. That way it's down to the implementation to know when it should and shouldn't expect a body. So for example, in a 204, I shouldn't call.body()
but in other scenarios I should probably expect the body to be present.