def get_response_object(url, method='GET', headers=None):
 parsed_url = urlparse.urlparse(url)
 parsed_qs = parse_qs(parsed_url.query)
 secure = (parsed_url.scheme == 'https')
 headers = (headers or {})
 method = method.upper()
 con = Connection(secure=secure, host=parsed_url.netloc)
 response = con.request(action=parsed_url.path, params=parsed_qs, headers=headers, method=method)
 return response

def get_response_object ( url , method = 'GET' , headers = None ) : parsed_url = urlparse . urlparse ( url ) parsed_qs = parse_qs ( parsed_url . query ) secure = ( parsed_url . scheme == 'https' ) headers = ( headers or { } ) method = method . upper ( ) con = Connection ( secure = secure , host = parsed_url . netloc ) response = con . request ( action = parsed_url . path , params = parsed_qs , headers = headers , method = method ) return response
utility function which uses libclouds connection class to issue an http request .