import urllib.request
r = urllib.request.Request("https://www.google.com")
handler = urllib.request.HTTPSHandler()
handler.https_open(r)
but this leads to AttributeError: 'Request' object has no attribute 'timeout'
How can I get HTTPSHandler.https_open()
to work? Or does urlopen
call the https_open
function if I used
opener = urllib.request.build_opener(urllib.request.HTTPSHandler)
urllib.request.install_opener(opener)
before and actually does make a HTTPS POST request already? Thanks!