๐Ÿ“ฆ Kong / httpsnippet

๐Ÿ“„ jsonObj-multiline.py ยท 11 lines
1
2
3
4
5
6
7
8
9
10
11import requests

url = "http://mockbin.com/har"

payload = {"foo": "bar"}
headers = {"content-type": "application/json"}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)