handle --form more correctly (#385)

This commit is contained in:
Boris Verkhovskiy
2022-04-14 18:26:13 -07:00
committed by GitHub
parent 733f110e56
commit 5c2f1ab054
13 changed files with 105 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
curl -s --user 'test' \
http://localhost:28139/v3 \
-F from='test@tester.com' \
-F to='devs@tester.net' \
--form-string to='devs@tester.net' \
-F subject='Hello' \
-F text='Testing the converter!'

View File

@@ -6,7 +6,7 @@ headers = {
files = {
'attributes': (None, '{"name":"tigers.jpeg", "parent":{"id":"11446498"}}'),
'file': ('myfile.jpg', open('myfile.jpg', 'rb')),
'file': open('myfile.jpg', 'rb'),
}
response = requests.post('https://localhost:28139/api/2.0/files/content', headers=headers, files=files)

2
test/fixtures/python/post_image.py generated vendored
View File

@@ -1,7 +1,7 @@
import requests
files = {
'image': ('image.jpg', open('image.jpg', 'rb')),
'image': open('image.jpg', 'rb'),
}
response = requests.post('http://localhost:28139/targetservice', files=files)

View File

@@ -7,7 +7,7 @@ headers = {
}
files = {
'files': ('47.htz', open('47.htz', 'rb')),
'files': open('47.htz', 'rb'),
'name': (None, '47'),
'oldMediaId': (None, '47'),
'updateInLayouts': (None, '1'),