def post_json():
url = 'http://x.x.x.x/api/v1/builds/report/'
data = make_json()
headers = {"Content-Type": "application/json; charset=UTF-8", }
conn = httplib.HTTPConnection("x.x.x.x", 80)
conn.request('POST', url, json.dumps(data), headers)
response = conn.getresponse()
res = response.read()
print res
Python post json
最新推荐文章于 2024-07-22 03:32:20 发布