大家好
最近遇到一个问题
一个有GET和POST的应用程式网址
用requests写
跑GET没问题,但跑POST会失败
有试过用其他语言写,GET和POST都OK
所以应该可以排除网络环境issue
不晓得该如何解决...
程式码如下面三行(网址隐码):
import requests
my_data = {'msg': 'TEST'}
r = requests.post('***.***.**/***.********',data = my_data)
跑到timeout之后显示的讯息如下(网址隐码):
HTTPSConnectionPool(host='***.***.**', port=443): Max retries exceeded
with url:***.********
(Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at
0x0000021D6C3466D0>: Failed to establish a new connection: [WinError 10060] 连
线尝试失败,因为连线对象有一段时间并未正确回应,或是连线建立失败,因为连线的主
机无法回应。'))
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred: