在Python 中使用requests进行post传输,服务器返回格式不正确。
通过抓包,16进制下发现0d 0a被转义成只有0a,0d为“\r”,0a为"\n"
于是添加如下代码
post_dict = post_dict.replace("\n", "\r\n")
问题解决。
在Python 中使用requests进行post传输,服务器返回格式不正确。
通过抓包,16进制下发现0d 0a被转义成只有0a,0d为“\r”,0a为"\n"
于是添加如下代码
post_dict = post_dict.replace("\n", "\r\n")
问题解决。