mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-23 07:38:58 -04:00
Curl generation query params bug (Fixes #810)
This commit is contained in:
18
packages/insomnia-httpsnippet/test/fixtures/output/python/python3/full.py
vendored
Executable file
18
packages/insomnia-httpsnippet/test/fixtures/output/python/python3/full.py
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
import http.client
|
||||
|
||||
conn = http.client.HTTPConnection("mockbin.com")
|
||||
|
||||
payload = "foo=bar"
|
||||
|
||||
headers = {
|
||||
'cookie': "foo=bar; bar=baz",
|
||||
'accept': "application/json",
|
||||
'content-type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
|
||||
conn.request("POST", "/har?foo=bar&foo=baz&baz=abc&key=value", payload, headers)
|
||||
|
||||
res = conn.getresponse()
|
||||
data = res.read()
|
||||
|
||||
print(data.decode("utf-8"))
|
||||
Reference in New Issue
Block a user