Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
velo added a commit that referenced this pull request Oct 7, 2024
* feat: Added decodeVoid feature

* fix: Added decodeVoid for AsyncFeign

---------

Co-authored-by: Marvin Froeder <[email protected]>
velo added a commit that referenced this pull request Oct 8, 2024
* feat: Added decodeVoid feature

* fix: Added decodeVoid for AsyncFeign

---------

Co-authored-by: Marvin Froeder <[email protected]>
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.

2 participants