1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17import 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)