t.w.c.Agent(object) : class documentation

Part of twisted.web.client View Source View In Hierarchy

Agent is a very basic HTTP client. It supports HTTP scheme URIs. It does not support persistent connections.
Instance Variables_reactorThe IReactorTCP implementation which will be used to set up connections over which to issue requests.
Present Since9.0
Method __init__ Undocumented
Method request Issue a new request.
Method _computeHostValue Compute the string to use for the value of the Host header, based on the given scheme, host name, and port number.
def __init__(self, reactor): (source)
Undocumented
def request(self, method, uri, headers=None, bodyProducer=None): (source)
Issue a new request.
ParametersmethodThe request method to send. (type: str )
uriThe request URI send. (type: str )
headersThe request headers to send. If no Host header is included, one will be added based on the request URI. (type: Headers )
bodyProducerAn object which will produce the request body or, if the request body is to be empty, None. (type: IBodyProducer provider )
ReturnsA Deferred which fires with the result of the request (a Response instance), or fails if there is a problem setting up a connection over which to issue the request. It may also fail with SchemeNotSupported if the scheme of the given URI is not supported. (type: Deferred )
def _computeHostValue(self, scheme, host, port): (source)
Compute the string to use for the value of the Host header, based on the given scheme, host name, and port number.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:07:41.