interface documentation

class IAgentEndpointFactory(Interface): (source)

Known implementations: twisted.web.client._StandardEndpointFactory

View In Hierarchy

An IAgentEndpointFactory provides a way of constructing an endpoint used for outgoing Agent requests. This is useful in the case of needing to proxy outgoing connections, or to otherwise vary the transport used.

Present Since
15.0
Method endpointForURI Construct and return an IStreamClientEndpoint for the outgoing request's connection.
def endpointForURI(uri): (source)

Construct and return an IStreamClientEndpoint for the outgoing request's connection.

Parameters
uri:twisted.web.client.URIThe URI of the request.
Returns
an IStreamClientEndpoint providerAn endpoint which will have its connect method called to issue the request.
Raises
twisted.internet.error.SchemeNotSupportedIf the given URI's scheme cannot be handled by this factory.