webob.client – Send WSGI requests over HTTP¶
Client¶
-
class
webob.client.SendRequest(HTTPConnection=<class httplib.HTTPConnection at 0x2958a70>, HTTPSConnection=<class httplib.HTTPSConnection at 0x2958b90>)¶ Sends the request, as described by the environ, over actual HTTP. All controls about how it is sent are contained in the request environ itself.
This connects to the server given in SERVER_NAME:SERVER_PORT, and sends the Host header in HTTP_HOST – they do not have to match. You can send requests to servers despite what DNS says.
Set
environ['webob.client.timeout'] = 10to set the timeout on the request (to, for example, 10 seconds).Does not add X-Forwarded-For or other standard headers
If you use
send_request_appthen simplehttplibconnections will be used.-
MULTILINE_RE= <_sre.SRE_Pattern object at 0x2a5fe70>¶
-
parse_headers(message)¶ Turn a Message object into a list of WSGI-style headers.
-
-
webob.client.send_request_app¶