http_proxy_full_auth_string = "https://%s:%s@%s:%s" % (http_proxy_user,http_proxy_passwd,http_proxy_server,http_proxy_port)
proxy_handler = urllib2.ProxyHandler({"https":http_proxy_full_auth_string})
proxy_auth_handler = urllib2.ProxyBasicAuthHandler()
proxy_auth_handler.add_password(None, 'host','user', 'passwd')
opener = urllib2.build_opener(proxy_handler,proxy_auth_handler)
urllib2.install_opener(opener)
urllib2.urlopen(uri)
request=urllib2.Request(url,data,headers)
request.get_method = lambda: 'POST'
r = opener.open(request)
这是我使用代理在python中执行https发布的代码。这会有用吗我将r.code设为200,但是另一方没有收到数据。