-
-
Notifications
You must be signed in to change notification settings - Fork 764
Deserialize payload to str when content type is www-form-urlencoded #5536
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for the contribution and recreating the clean PR 👍
I have not dug too deeply into this PR, but at face value this may fix Issue #4853 as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sravs-dev Is there a unit test that shows an example for unsupported content type for x-www-form-urlencoded and how failure is handled?
@armab @m4dcoder When I try to give invalid content/body for x-www-form-urlencoded mimetype, the request building itself fails like this failure in unit test. |
@m4dcoder Could you please take a look at the comment above? |
@sravs-dev What I meant on unsupported content type for x-www-form-urlencoded is a use case where six.ensure_str returns an error and how that error is handled? Is this possible to test? |
@m4dcoder Thanks for your reply. six.ensure_str takes bytes input, I dont think we can simulate this input as its sent by the API internally. We can only send the payload as key value pair for x-www-form-urlencoded content type. |
Merged! Thanks everyone 👍 |
…oded
Opened in favor of #5513