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
I noticed that the code generator for python has issues with a edge case of form-data. I send a zip file along with a string as form-data. Here is a screenshot (I will export the request for u as well :))
To Reproduce
Import the collection and try out the code generation.
Okay I tried to add the json file, but it is not allowed. (You should support that since this is your export format). Here as zip: export.postman_collection.json.zip
Expected code snippet and corresponding request
I adapted the generated code and the following did work for me:
`
import requests
Describe the bug
Hi there Postman-Team,
I noticed that the code generator for python has issues with a edge case of form-data. I send a zip file along with a string as form-data. Here is a screenshot (I will export the request for u as well :))
To Reproduce
Import the collection and try out the code generation.
Okay I tried to add the json file, but it is not allowed. (You should support that since this is your export format). Here as zip:
export.postman_collection.json.zip
Expected code snippet and corresponding request
I adapted the generated code and the following did work for me:
`
import requests
url = "http://127.0.0.1:5002/executors"
payload={}
files=[
('executor',('iris_classifier.zip',open('/Users/r2d2/dev/IAPP-TESTING/iris_classifier.zip','rb'),'application/zip')),
('executor_name', (None,'name',None))
]
headers = {
'auth_key': '123'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
`
POSTMAN VERSION
I used Version 9.31.0 (9.31.0) on macosx.
Thx in advance. I hope this helps you to improve your already great product even further <3.
The text was updated successfully, but these errors were encountered: