webob.client -- Send WSGI requests over HTTP


class webob.client.SendRequest(HTTPConnection=<class 'http.client.HTTPConnection'>, HTTPSConnection=<class 'http.client.HTTPSConnection'>)

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 simple httplib connections will be used.


Turn a Message object into a list of WSGI-style headers.