Issue2698
Created on 2018-07-20.15:27:06 by wheelerlaw, last changed 2018-07-20.16:22:40 by amak.
msg12060 (view) |
Author: Wheeler Law (wheelerlaw) |
Date: 2018-07-20.15:29:21 |
|
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 16:22:40 | amak | set | nosy:
+ amak |
2018-07-20 15:34:22 | wheelerlaw | set | type: behaviour -> crash |
2018-07-20 15:31:45 | wheelerlaw | set | milestone: Jython 2.7.1 -> |
2018-07-20 15:29:22 | wheelerlaw | set | messages:
+ msg12060 |
2018-07-20 15:27:06 | wheelerlaw | create | |
|