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 |
---|---|---|---|
177 | Method | __init__ | Constructor. |
215 | Method | request | Send an HTTP request. |
229 | Method | request_full | Send an HTTP request. |
244 | Method | close | Close an open HTTP connection. |
268 | Method | is_busy | Test whether the client is busy processing requests. |
350 | Method | connectionFailed | Callback invoked by the HTTP client factory when the connection fails. |
362 | Method | connectionLost | Callback invoked by the HTTP client factory when losing the connection. |
397 | Method | connectionLostForever | Callback invoked by the HTTP client factory when the connection is lost |
419 | Method | connectionMade | Callback invoked by the HTTP client protocol when the connection is |
435 | Method | requestWriteFinished | Callback invoked by the HTTP client protocol when a request has been |
197 | Method | _reset | Undocumented |
203 | Method | _open | Open an HTTP connection. |
280 | Method | _queue_request | Enqueue a request to submit to the server. |
313 | Method | _submit_next_request | Undocumented |
346 | Method | _callback_request_defer | Undocumented |
450 | Method | _request_done | Callback invoked when receiving the response to a request. |
Parameters | host | hostname or IP address of the server
(type: str
) |
port | TCP port on which the server listens
(type: int
) | |
pipeline | whether the client should pipeline requests
(type: bool
) |
This is a non-blocking method. One should wait for self._open_defer to be fired before attempting to send any request to the server. This method should not be called explicitely, the connection will be opened upon reception of the first request.
Parameters | uri | the URI of the resource to request
(type: str
) |
method | the HTTP method of the request (default: GET)
(type: str
) | |
Returns | a deferred triggered when the request is executed
(type: elisa.core.utils.cancellable_defer.CancellableDeferred
) |
Parameters | request | request to submit
(type: elisa.plugins.http_client.extern.client_http.ClientRequest
) |
Returns | a deferred triggered when the request is executed
(type: elisa.core.utils.cancellable_defer.CancellableDeferred
) |
Returns | a deferred triggered when the connection is closed
(type: twisted.internet.defer.Deferred
) |
Returns | True if the client is busy, False otherwise
(type: bool
) |
Parameters | request | request to submit
(type: twisted.web2.client.http.ClientRequest
) |
Returns | a deferred triggered when the request is executed
(type: elisa.core.utils.cancellable_defer.CancellableDeferred
) |
Parameters | connector | the TCP connector
(type: twisted.internet.tcp.Connector
) |
reason | the reason of the connection failure
(type: twisted.python.failure.Failure
) |
Parameters | connector | the TCP connector
(type: twisted.internet.tcp.Connector
) |
reason | the reason of the connection loss
(type: twisted.python.failure.Failure
) | |
Returns | False if the connection has been closed, True otherwise.
(type: bool
) |
Parameters | connector | the TCP connector
(type: twisted.internet.tcp.Connector
) |
reason | the reason of the last connection loss
(type: twisted.python.failure.Failure
) |
Parameters | protocol | the HTTP client protocol
(type: ElisaHttpClientProtocol
) |
Parameters | req | the channel request that has been written
(type: http_client.extern.client_http.HTTPClientChannelRequest
) |