Message12060
import json
import urllib2
import base64
import getpass
username = raw_input("Username: ")
password = getpass.getpass("Password: ")
base64UsernamePassword = base64.b64encode(username + ":" + password)
request = urllib2.Request("https://<myhttpsurl>/", headers={"Authorization": "Basic " + base64UsernamePassword})
response = urllib2.urlopen(request).read()
I get the following error:
Traceback (most recent call last):
File "/home/wlaw/openshift_xlr_templates/src/infrastructureValidator/InfrastructureValidator.py", line 12, in <module>
response = urllib2.urlopen(request).read()
File "/usr/share/jython/Lib/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/share/jython/Lib/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/share/jython/Lib/urllib2.py", line 451, in _open
return self._call_chain(self.handle_open, 'unknown',
File "/usr/share/jython/Lib/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/share/jython/Lib/urllib2.py", line 1266, in unknown_open
raise URLError('unknown url type: %s' % type)
urllib2.URLError: <urlopen error unknown url type: https> |
|
Date |
User |
Action |
Args |
2018-07-20 15:29:22 | wheelerlaw | set | messageid: <1532100562.44.0.56676864532.issue2698@psf.upfronthosting.co.za> |
2018-07-20 15:29:22 | wheelerlaw | set | recipients:
+ wheelerlaw |
2018-07-20 15:29:22 | wheelerlaw | link | issue2698 messages |
2018-07-20 15:29:21 | wheelerlaw | create | |
|