标签:ati code app try ica python 封装 发送post请求 port
import requests import json # 发送post请求 def post(url, headers, values): try: headers[‘Content-Type‘] = "application/json; charset=utf-8" response = requests.post( url=url, headers=headers, data=json.dumps(values) ) return json.loads(response.content) except requests.exceptions.RequestException, e: print(‘HTTP Request failed :‘, url, values) print e
标签:ati code app try ica python 封装 发送post请求 port
原文地址:https://www.cnblogs.com/qiqi-yhq/p/12069386.html