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
JSON POST body URI encoded (RFC3986) #1395
Comments
Thanks for reporting, I agree that we should not pass JSON POST bodies through |
That was the reason why I proposed this change as an option (first commit). If Twitter allows json post bodies (not sure) then there it should be rfc3986 encoded. So what's the expected behavior exactly? |
Encoding regular I didn't think about this until now, but encoding JSON in this way is not transparent. I'd be surprised if there were any servers that will also URL-decode while decoding JSON. Propose deleting this line, let me know what you think. |
OK, I'll take a look, and submit PR (the tests should be changed a bit) |
Shouldn't the encoding be removed also on line 1439? There we are setting JSON request body as well, I believe. |
I'm just looking at it :) |
Example {json:{}} or {body:{}, json:true} Related to request#1315 Closes request#1395
Version |
Thanks for the very fast response on this! Version 2.53.0 works like a charm! :) |
glad to hear it, that was a nasty bug 😓 |
Hey @chacal @nylen I'm running into this using I send this
Using Thanks! |
@crobinson42 you are not supposed to send URL encoded JSON. If you really do need to send JSON then use the |
@simov Ahh, THANK you for pointing that out! I added the option flag
|
Due to pull request #1315 all POSTed JSON content is URI encoded in 2.52.1.
Is there some way to avoid this? The server I'm POSTing to does not expect JSON data to be encoded, but instead sent as is.
Anyhow, is it OK to encode JSON content at all as the format itself allows the usage of e.g. '!' and '*' without any encoding?
{"key": "value !"}
is a very different JSON than{"key": "value %21"}
The text was updated successfully, but these errors were encountered: