Skip to content
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

feat: Added decodeVoid feature #2131

Merged
merged 5 commits into from Jul 28, 2023
Merged

feat: Added decodeVoid feature #2131

merged 5 commits into from Jul 28, 2023

Conversation

malikzh
Copy link
Contributor

@malikzh malikzh commented Jul 22, 2023

I added decodeVoid() feature, with which can be possible to change default behaviour of calling decoders for methods which has a void return type.

Currently, if method has void return type, ResponseInterceptor or Decoder will not be called.

And this is good if you don't working with REST-less API which everytime returns 200 OK, and that response has a code parameter, using that, for example, I need to detect response was successful or not.

And I don't need to return any data from the method, because if method fails I will get exception, and I can avoid warnings from static analyzer about "ignored return value", if I would be changed void to Object to bypass this limitation.

I had idea about check the response in the Client wrapper, but then I would need to decode a JSON twice time in some cases.

@velo velo merged commit 3e089ff into OpenFeign:master Jul 28, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants