-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support expected (but empty) response body (#111)
This commit modifies the BaseService.Request() method so that a "missing" response body will result in a nil "result" being returned to the caller (generated operation code). In this context, "missing" implies that an operation is expected to have a non-empty response body but the server simply didn't return anything in the body of the HTTP response message. This could be a valid scenario in which a server might return one of several response status codes for an operation, some that include a response body and some that don't. Previously, if a response body was expected (i.e. the Request() method's `result` parameter was passed in as a non-nil value), an unmarshalling error ("EOF") would occur. This new behavior is aligned with the Java core where a null "result" object would be returned in this same type of scenario. Co-authored-by: Mike Kistler <[email protected]>
- Loading branch information
Showing
4 changed files
with
331 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.