I need to be able to specify SSL certificate CA root, yet be able to insert HTTP cookie with Python 2.7.10 urllib2
library
ssl_handler = urllib2.HTTPSHandler()
opener = urllib2.build_opener(ssl_handler)
opener.addheaders.append(("Cookie","foo=blah"))
res = opener.open(https://example.com/some/info)
I know urllib2 supports cafile
param, where should I use it in my code ?
urlopen
documentation:so, please try:
or