Open
Description
httpbin post has a header item '"X-Amzn-Trace-Id" which causes an result which is contrary to the documentation.
Quickstart documentation
"More complicated POST requests"
payload_tuples = [('key1', 'value1'), ('key1', 'value2')]
r1 = requests.post('https://httpbin.org/post', data=payload_tuples)
payload_dict = {'key1': ['value1', 'value2']}
r2 = requests.post('https://httpbin.org/post', data=payload_dict)
print(r1.text)
{
...
"form": {
"key1": [
"value1",
"value2"
]
},
...
}
r1.text == r2.text
True
Actual Result
Reproduction Steps
import requests
payload_tuples = [('key1', ' "value1'),('key1', 'value2')]
payload_dict = {'key1': ['value1', 'value2']}
r1 = requests.post('https://httpbin.org/post', data=payload_tuples)
r2 = requests.post('https://httpbin.org/post', data=payload_dict)
r1.text == r2.text
False
r1.json()['form'] == r2.json()['form']
True
Diagnostic Information
pprint.pprint(r1.text)
('{…
' "form": {\n'
' "key1": [\n'
' "value1", \n'
' "value2"\n'
' ]}
…
' "X-Amzn-Trace-Id": "Root=1-682cb364-67bf5e846c56c77e24839642"\n'
'… },
…
pprint.pprint(r2.text)
('{…
' "form": {\n'
' "key1": [\n'
' "value1", \n'
' "value2"\n'
' ]}
…
' "X-Amzn-Trace-Id": "Root=1-682cb30f-208ede8e2eda5cf75cf578ac"\n'
' … },
…
Metadata
Metadata
Assignees
Labels
No labels