glanceclient.common.http module¶
- class glanceclient.common.http.HTTPClient(endpoint, **kwargs)¶
Bases:
_BaseHTTPClient
- delete(url, **kwargs)¶
- get(url, **kwargs)¶
- head(url, **kwargs)¶
- log_curl_request(method, url, headers, data, kwargs)¶
- static log_http_response(resp)¶
- static parse_endpoint(endpoint)¶
- patch(url, **kwargs)¶
- post(url, **kwargs)¶
- put(url, **kwargs)¶
- class glanceclient.common.http.SessionClient(session, **kwargs)¶
Bases:
Adapter
,_BaseHTTPClient
- request(url, method, **kwargs)¶
- glanceclient.common.http.encode_headers(headers)¶
Encodes headers.
Note: This should be used right before sending anything out.
- Parameters:
headers – Headers to encode
- Returns:
Dictionary with encoded headers’ names and values
- glanceclient.common.http.get_http_client(endpoint=None, session=None, **kwargs)¶