Package ganeti :: Package http :: Module client :: Class HttpClientRequest
[hide private]
[frames] | no frames]

Class HttpClientRequest

source code


Instance Methods [hide private]
 
__init__(self, host, port, method, path, headers=None, post_data=None, read_timeout=None, curl_config_fn=None)
Describes an HTTP request.
source code
 
__repr__(self)
repr(x)
source code
 
url(self)
Returns the full URL for this requests.
source code
 
identity(self)
Returns identifier for retrieving a pooled connection for this request.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host, port, method, path, headers=None, post_data=None, read_timeout=None, curl_config_fn=None)
(Constructor)

source code 

Describes an HTTP request.

Parameters:
  • host (string) - Hostname
  • port (int) - Port
  • method (string) - Method name
  • path (string) - Request path
  • headers (list or None) - Additional headers to send, list of strings
  • post_data (string or None) - Additional data to send
  • read_timeout (int) - if passed, it will be used as the read timeout while reading the response from the server
  • curl_config_fn (callable) - Function to configure cURL object before request (Note: if the function configures the connection in a way where it wouldn't be efficient to reuse them, a "identity" property should be defined, see HttpClientRequest.identity)
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

url(self)

source code 

Returns the full URL for this requests.

Decorators:
  • @property

identity(self)

source code 

Returns identifier for retrieving a pooled connection for this request.

This allows cURL client objects to be re-used and to cache information (e.g. SSL session IDs or connections).

Decorators:
  • @property