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
Support for Params object (include request.body) #488
Comments
I think I understand what you are asking, but can you link to a reference example? Thanks! |
the Params object gets filled from the Request object in this function: the Body field of the Request object is an io.ReadCloser this is probably why it is not exposed through the Params object. You can get to the Body field through you will have to close the ReadCloser once you finished reading from it |
@wanli2011 I ran into same issue with AngularJS and content-type: application/json. If you only need support for the top level key/value pairs in a json object this filter should do the trick.
Insert it right after the
|
@smothers 👍 After a while trying to read some JSON from the request body this line did the trick.
|
JSON is now collected as well |
Now, All request parameters are collected into a single Params object. That includes:
URL Path parameters
URL Query parameters
Form values (Multipart or not)
File uploads
but request body parameters are not collected into a single Params object. examaple: angluar's json request.
my english is poor, hope you understand,sorry
The text was updated successfully, but these errors were encountered: