You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Postman generates a 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryCH5n7WHVqUCBNgd6', as a header leading to an inaccurately set boundary when actually running the code using Python.(-> 500 error from server).
To Reproduce
Create a multipart POST request with file upload on Postman and generate a code snippet. Run this code snippet in Python.(might also occur with other programming languages too). Even though the request works in Postman, it does not work in Python(500 error).
Expected code snippet and corresponding request
Basically, I removed the content type header and things worked fine.
The text was updated successfully, but these errors were encountered:
davidtsong
changed the title
Remove Content Type Header for Python Requests for Multipart POST Request
Content Type Header for Python Requests for Multipart POST Request causes Errors
May 30, 2020
Can you tell me more about the app version and ss along with it ? Also are you using the new code generator ? Go-to settings and switch to new code generator if you haven't already
Second option
Hey @davidtsong, just stumbled across this old issue and it seems to be working fine now. The header is not being set now. Please reopen the issue with details if you are still facing problems.
Describe the bug
Postman generates a 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryCH5n7WHVqUCBNgd6', as a header leading to an inaccurately set boundary when actually running the code using Python.(-> 500 error from server).
To Reproduce
Create a multipart POST request with file upload on Postman and generate a code snippet. Run this code snippet in Python.(might also occur with other programming languages too). Even though the request works in Postman, it does not work in Python(500 error).
Expected code snippet and corresponding request
Basically, I removed the content type header and things worked fine.
Additional context
https://stackoverflow.com/questions/17415084/multipart-data-post-using-python-requests-no-multipart-boundary-was-found
The text was updated successfully, but these errors were encountered: