Is it possible to inspect the attributes of an Python urllib2.Request (url, data, headers etc) when using an urllib2.OpenerDirector:
cookie_jar = cookielib.CookieJar()
opener = urllib2.OpenerDirector()
opener.add_handler(urllib2.ProxyHandler())
opener.add_handler(urllib2.UnknownHandler())
opener.add_handler(urllib2.HTTPHandler())
opener.add_handler(urllib2.HTTPRedirectHandler())
opener.add_handler(urllib2.HTTPDefaultErrorHandler())
opener.add_handler(urllib2.HTTPSHandler())
opener.add_handler(urllib2.HTTPErrorProcessor())
opener.add_handler(urllib2.HTTPCookieProcessor(cookie_jar))
request = urllib2.Request('http://example.com')
response = opener.open(request)
The request object has no attributes set before being opened. Is there a way to access them?