一、需求:用python实现http请求,请求体内容获取excel表格里面的内容
1,而excel表格内容是字典,有换行;
{
"uid": "10523682",
"type": "1",
"languageCode": "cn"
}
实现的代码
结果打印出来:多了\n 空格 \
2,而excel表格内容是字典,没有换行;
{"uid": "10523682","type": "1","languageCode": "cn"}
结果打印出来:只有\
二:用上面请求体发送,结果报格式错误
d = requests.post(url,res)
三;解决方法加上json.loads()