Class e.p.h.h.ElisaHttpClient(Loggable):

Part of elisa.plugins.http_client.http_client View In Hierarchy

Known subclasses: elisa.plugins.http_client.http_client.ElisaAdvancedHttpClient

twisted.web2 based HTTP client.

It connects to a given server and optionally supports request pipelining. It does not support HTTP redirections.
Line # Kind Name Docs
176 Method __init__ Constructor.
214 Method request Send an HTTP request.
228 Method request_full Send an HTTP request.
243 Method close Close an open HTTP connection.
267 Method is_busy Test whether the client is busy processing requests.
345 Method connectionFailed Callback invoked by the HTTP client factory when the connection fails.
357 Method connectionLost Callback invoked by the HTTP client factory when losing the connection.
392 Method connectionLostForever Callback invoked by the HTTP client factory when the connection is lost
414 Method connectionMade Callback invoked by the HTTP client protocol when the connection is
430 Method requestWriteFinished Callback invoked by the HTTP client protocol when a request has been
def __init__(self, host, port=80, pipeline=True):
Constructor.
Parametershosthostname or IP address of the server (type: str )
portTCP port on which the server listens (type: int )
pipelinewhether the client should pipeline requests (type: bool )
def request(self, uri, method='GET'):
Send an HTTP request.
Parametersurithe URI of the resource to request (type: str )
methodthe HTTP method of the request (default: GET) (type: str )
Returnsa deferred triggered when the request is executed (type: elisa.core.utils.cancellable_defer.CancellableDeferred )
def request_full(self, request):
Send an HTTP request.
Parametersrequestrequest to submit (type: elisa.plugins.http_client.extern.client_http.ClientRequest )
Returnsa deferred triggered when the request is executed (type: elisa.core.utils.cancellable_defer.CancellableDeferred )
def close(self):
Close an open HTTP connection.
Returnsa deferred triggered when the connection is closed (type: twisted.internet.defer.Deferred )
def is_busy(self):
Test whether the client is busy processing requests.
ReturnsTrue if the client is busy, False otherwise (type: bool )
def connectionFailed(self, connector, reason):
Callback invoked by the HTTP client factory when the connection fails.
Parametersconnectorthe TCP connector (type: twisted.internet.tcp.Connector )
reasonthe reason of the connection failure (type: twisted.python.failure.Failure )
def connectionLost(self, connector, reason):
Callback invoked by the HTTP client factory when losing the connection.
Parametersconnectorthe TCP connector (type: twisted.internet.tcp.Connector )
reasonthe reason of the connection loss (type: twisted.python.failure.Failure )
ReturnsFalse if the connection has been closed, True otherwise. (type: bool )
def connectionLostForever(self, connector, reason):
Callback invoked by the HTTP client factory when the connection is lost forever. This happens when the maximum number of connection retries is reached.
Parametersconnectorthe TCP connector (type: twisted.internet.tcp.Connector )
reasonthe reason of the last connection loss (type: twisted.python.failure.Failure )
def connectionMade(self, protocol):
Callback invoked by the HTTP client protocol when the connection is established.
Parametersprotocolthe HTTP client protocol (type: ElisaHttpClientProtocol )
def requestWriteFinished(self, req):
Callback invoked by the HTTP client protocol when a request has been fully written.
Parametersreqthe channel request that has been written (type: http_client.extern.client_http.HTTPClientChannelRequest )
API Documentation for Elisa Media Center, generated by pydoctor at 2008-09-29 19:14:29.