Don't convert data={"key": [bytes|bytearray]} cases into strings#1608
Don't convert data={"key": [bytes|bytearray]} cases into strings#1608mertyildiran wants to merge 1 commit intoencode:masterfrom
data={"key": [bytes|bytearray]} cases into strings#1608Conversation
Hi, thanks for your clarification, I would like to confirm when I open a file and put it in a request, I should pay attention to manually set the read mode to be 'rb', because when I work with string it cannot work like you said. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Related to #1539
In case of a value in the
datakeyword argument isbytesorbytesarray, converting them tostrwas not the original behavior. I think it's forgotten to cover these cases in #1539 so this PR coversbytes|bytearraycases.To replicate the issue:
P.S. The binary data is being sent as is in the
requestspackage and in the versions ofhttpxbefore0.18.0.