码迷,mamicode.com
首页 > Web开发 > 详细

urllib3 ProxyManager

时间:2016-03-16 18:54:02      阅读:1569      评论:0      收藏:0      [点我收藏+]

标签:

ProxyManager is an HTTP proxy-aware subclass of PoolManager. It produces a single
HTTPConnectionPool instance for all HTTP connections and individual per-server:port
HTTPSConnectionPool instances for tunnelled HTTPS connections.

headers = urllib3.make_headers(proxy_basic_auth=’myusername:mypassword’)
proxy = urllib3.ProxyManager(’http://localhost:3128’, proxy_headers=headers)
r = proxy.request(’GET’, ’http://example.com/’)
r.status

API

技术分享

urllib3 ProxyManager

标签:

原文地址:http://www.cnblogs.com/shadowwalker/p/5284353.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!