如何处理超时

时间:2017-12-01 14:41:09

标签: python python-requests authorize.net

我有一个使用authorize.net的应用程序,我们似乎不时有连接问题。

我认为这里没有回复。

response = createtransactioncontroller.getresponse()

在查看authorizenet库的代码时,我注意到没有设置超时。

self._httpResponse = requests.post(self.endpoint, data=xmlRequest, headers=constants.headers, proxies=proxyDictionary)

如果是这种情况,我应该如何处理永远不会返回响应的情况?为authorizenet库添加超时似乎是一种黑客攻击,因为它在我的项目范围之外使用,但它似乎也不是添加我自己的计时器的最佳做法。你会推荐什么解决方案?

0 个答案:

没有答案