【发布时间】:2012-02-10 12:55:22
【问题描述】:
我正在尝试摆脱在 python27 API 中使用 httplib 时遇到的异常 HTTPException('ApplicationError: 5 ',)(在 google appengine 上运行) - 在这篇文章 ApplicationError2 and ApplicationError5 when communicating with external api from AppEngine 中有更详细的说明。我想我或许可以尝试使用 httplib2。我可以看到调用 httplib 的 API 的唯一部分是:
def _get_conn(self):
return httplib.HTTPConnection(str(self.host), str(self.port), timeout=120)
httplib2 中是否有直接等效于 httplib.HTTPConnection() 的方法?我已经搜索过,但找不到任何东西。
【问题讨论】:
标签: python google-app-engine python-2.7 httplib httplib2