mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-22 23:28:33 -04:00
15 lines
259 B
Python
Executable File
15 lines
259 B
Python
Executable File
import http.client
|
|
|
|
conn = http.client.HTTPConnection("mockbin.com")
|
|
|
|
payload = "Hello World"
|
|
|
|
headers = { 'content-type': "text/plain" }
|
|
|
|
conn.request("POST", "/har", payload, headers)
|
|
|
|
res = conn.getresponse()
|
|
data = res.read()
|
|
|
|
print(data.decode("utf-8"))
|