335
331
basic_auth = '{0}:{1}'.format(
336
332
(config.webservice.admin_user if username is None else username),
337
333
(config.webservice.admin_pass if password is None else password))
339
338
response, content = Http().request(url, method, data, headers)
340
339
# If we did not get a 2xx status code, make this look like a urllib2
341
340
# exception, for backward compatibility with existing doctests.