-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Can't read json raw request #23
Comments
Hello and happy new year! When sending JSON requests, don't forget the |
Ah, I missed it! Now I got the Request.Data works, thanks! Aaand how about Request.Integer() and the others Accessors? still can't get the value, I tried add |
When numbers are parsed from a JSON request, they are Accessors won't convert your data, so if your request isn't validated, most of them won't work. From the docs:
Can you show me the raw request and a print of |
It was like this:
And I was trying to send the request using Thank you! |
Description
Version: v2.2.0
Environment: Mac Catalina, go1.13.4
Reproduces: always
Hi,
I tried to handle raw json request with Request.Data["key"], but got nil, first I sent this as my request on postman body raw json:
Then I log print out the result, got this:
And I also tried the Request.Integer(), Request.Bool() and some of them got error like this:
And this is log on terminal:
Expected result:
Got value on a specific key.
Anyway, happy new year everyone!! 🎉🎉🎉
The text was updated successfully, but these errors were encountered: