-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(http): expect json requests to decode, if the body is not empty
Right now we are allowing a bit of a hybrid solution when unmarshalling params from the request. If the post/put request does not have a body, we continue to attempt to unmarshal the params from any form values Previously, even if the body decoded successfully into the params, we would continue to try different methods for unmarshalling the request params. When we correctly set up the `HttpClient`'s ability to make GET http rpc calls using the reference in the url, we may want this to pass through again to the `RequestUnmarshaller` This also adjusts tests that send over a JSON body, but expect to decode using params. If a request wants to decode via url params (and not by using the body data), the body must be nil
- Loading branch information
Showing
2 changed files
with
22 additions
and
49 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