【问题标题】:Does tornado.httpclient.AsyncHTTPClient support using http proxy in Python3.x?tornado.httpclient.AsyncHTTPClient 是否支持在 Python3.x 中使用 http 代理?
【发布时间】:2014-03-05 02:01:39
【问题描述】:

我已经阅读了AsyncHTTPClient文档,没有找到如何通过AsyncHTTPClient方法使用代理。
所以我想知道是否有办法这样做。我的python版本是3.3。

我找到了 trequest 项目,但是当我使用 trequest.request 并通过在方法中添加代理来产生 http 请求时,我发现它无法按我的意愿工作。
有没有办法在 tornado 中异步使用requests

【问题讨论】:

    标签: python python-3.x tornado python-requests


    【解决方案1】:

    Tornado 目前仅在配置为使用 curl_httpclient 时支持代理。直到最近,这只是 Python 2.x,但现在可以(使用最新版本的 tornado 和 pycurl)在 Python 3 上使用它。只需在程序启动时执行tornado.httpclient.AsyncHTTPClient.configure("tornado.curl_httpclient.CurlAsyncHTTPClient")

    【讨论】:

    猜你喜欢
    • 2014-06-11
    • 1970-01-01
    • 2013-07-15
    • 2017-12-23
    • 1970-01-01
    • 2018-03-27
    • 1970-01-01
    • 2017-04-25
    • 1970-01-01
    相关资源
    最近更新 更多