New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] How to use Feign with a JAX-RS interface defining jaxrs.Response as return types #188
Comments
Would need some thought. Maybe a custom decoder I suppose.
|
Here's a workaround.. wrap your real decoder with this. final class ResponseDecoder implements Decoder {
private final Decoder delegate;
ResponseDecoder(Decoder delegate) {
this.delegate = delegate;
}
@Override
public Object decode(Response response, Type type) throws IOException {
if (jaxrs.Response.class.equals(type)) {
// construct and return.
}
return delegate.decode(response, type);
}
} |
Thanks, that's basically the solution I had, just wanted a confirmation. |
@bquenin @adriancole do you have sample to share how you converted feign Response to jaxrs Response with the entity object set into it. Thanks a lot in advance
|
Helo, |
Sorry figure it out! Got my entity like below!
|
That could be included on the jaxrs module... if you are interest in making a PR, I can review it. |
Hi,
I'm using Feign with a JAX-RS interface using JAX-RS Response return types (not feign.Response).
For instance:
When using feign and calling the "create" method, it seems that feigns tries to deserialize the jaxrs.Response object from the HTTP reponse.
Well it makes sense since it's the return type but it's obviously not what I expect. What would be the best way to handle jaxrs.Response type with feign ?
Thanks
The text was updated successfully, but these errors were encountered: