mirror of
https://github.com/curlconverter/curlconverter.git
synced 2022-05-22 02:35:29 +03:00
handle --form more correctly (#385)
This commit is contained in:
committed by
GitHub
parent
733f110e56
commit
5c2f1ab054
2
test/fixtures/curl_commands/get_with_form.sh
vendored
2
test/fixtures/curl_commands/get_with_form.sh
vendored
@@ -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!'
|
||||
|
||||
2
test/fixtures/python/multipart_post.py
generated
vendored
2
test/fixtures/python/multipart_post.py
generated
vendored
@@ -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
2
test/fixtures/python/post_image.py
generated
vendored
@@ -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)
|
||||
|
||||
2
test/fixtures/python/post_with_extra_whitespace.py
generated
vendored
2
test/fixtures/python/post_with_extra_whitespace.py
generated
vendored
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user