mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-22 23:28:33 -04:00
17 lines
389 B
Python
Executable File
17 lines
389 B
Python
Executable File
import requests
|
|
|
|
url = "http://mockbin.com/har"
|
|
|
|
querystring = {"foo":["bar","baz"],"baz":"abc","key":"value"}
|
|
|
|
payload = "foo=bar"
|
|
headers = {
|
|
'cookie': "foo=bar; bar=baz",
|
|
'accept': "application/json",
|
|
'content-type': "application/x-www-form-urlencoded"
|
|
}
|
|
|
|
response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
|
|
|
|
print(response.text)
|