webob.client
– Send WSGI requests over HTTP¶
Client¶
-
class
webob.client.
SendRequest
(HTTPConnection=<class httplib.HTTPConnection at 0x90a67dc>, HTTPSConnection=<class httplib.HTTPSConnection at 0x90a686c>)¶ 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'] = 10
to 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_app
then simplehttplib
connections will be used.-
MULTILINE_RE
= <_sre.SRE_Pattern object at 0x91624a0>¶
-
parse_headers
(message)¶ Turn a Message object into a list of WSGI-style headers.
-
-
webob.client.
send_request_app
¶