Part of twisted.web View Source
An HTTP 1.1 client.
The way to use the functionality provided by this module is to:
HTTP11ClientProtocol
to an HTTP server
Request
with the appropriate data
HTTP11ClientProtocol.request
Response
object
IProtocol
provider which can handle the response
body
Response.deliverBody
connectionLost
method is called, the
response is complete. See Response.deliverBody
for details.
Various other classes in this module support this usage:
Class | BadHeaders | Headers passed to Request were in
some way invalid. |
Class | ExcessWrite | The body IBodyProducer
for a request tried to write data after |
Class | ParseError | Some received data could not be parsed. |
Class | BadResponseVersion | The version string in a status line was unparsable. |
Class | RequestGenerationFailed | There was an error while creating the bytes which make up a request. |
Class | RequestTransmissionFailed | There was an error while sending the bytes which make up a request. |
Class | ConnectionAborted | The connection was explicitly aborted by application code. |
Class | WrongBodyLength | An IBodyProducer
declared the number of bytes it was going to |
Class | ResponseFailed | ResponseFailed
indicates that all of the response to a request was not |
Class | RequestNotSent | RequestNotSent
indicates that an attempt was made to issue a request but |
Class | HTTPParser | HTTPParser
handles the parsing side of HTTP processing. With a suitable |
Class | HTTPClientParser | An HTTP parser which only handles HTTP responses. |
Class | Request | A Request
instance describes an HTTP request to be sent to an HTTP |
Class | LengthEnforcingConsumer | An IConsumer
proxy which enforces an exact length requirement on the |
Function | makeStatefulDispatcher | Given a dispatch name and a function, return a function which can be |
Class | ChunkedEncoder | Helper object which exposes IConsumer
on top of HTTP11ClientProtocol |
Class | TransportProxyProducer | An IPushProducer
implementation which wraps another such thing and |
Class | HTTP11ClientProtocol | HTTP11ClientProtocol
is an implementation of the HTTP 1.1 client |
Class | _WrapperException | _WrapperException
is the base exception type for exceptions which |
Function | _callAppFunction | Call function . If it raises an exception, log it with a
minimal |
function
. If it raises an exception, log it with a
minimal description of the source.Returns | None
|
_state
attribute of
the instance.Parameters | name | A string which is used to construct the name of the subsidiary method to
invoke. The subsidiary method is named like '_%s_%s' % (name,
_state) .
|
template | A function object which is used to give the returned function a docstring. | |
Returns | The dispatcher function. |