# 使用 ensure_ascii=False
data = { 'name': '测试名称' } url = "https://api.weixin.qq.com/xxx/" data = json.dumps(data, ensure_ascii=False) headers = {'content-type': 'application/json;charset=utf-8'} response = requests.post(url, data=data.encode('utf-8'), headers=headers) res = json.loads(response.text)
标签:requets,Python,ascii,乱码,headers,json,data From: https://www.cnblogs.com/chaoqi/p/16640459.html