Available http client adapters¶
-
class
wsgiproxy.proxies.
HttpClient
(**connection_options)[source]¶ A HTTP client using stdlib’s httplib (Default client)
-
class
wsgiproxy.urllib3_client.
HttpClient
(pool=None, **urlopen_options)[source]¶ A HTTP client using urllib3
-
class
wsgiproxy.requests_client.
HttpClient
(chunk_size=24576, session=None, **requests_options)[source]¶ A HTTP client using requests
-
class
wsgiproxy.restkit_client.
HttpClient
(restkit_client=None, **restkit_options)[source]¶ A HTTP client using restkit
Use your own HTTP client:
>>> def client(uri, method, body, headers):
... headers = [('Content-Length', '0')]
... location = None # the Location header if any
... body_iter = ['']
... return '200 Ok', location, headers, body_iter
>>> proxy = HostProxy(application_url, client=client)