An HTTP 1.1 client.
The way to use the functionality provided by this module is to:
HTTP11ClientProtocol
to an HTTP serverRequest
with the appropriate dataHTTP11ClientProtocol.request
Response
objectIProtocol
provider which can handle the response bodyResponse.deliverBody
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 | BadResponseVersion |
The version string in a status line was unparsable. |
Class | ChunkedEncoder |
Helper object which exposes IConsumer on top of HTTP11ClientProtocol for streaming request bodies to the server. |
Class | ConnectionAborted |
The connection was explicitly aborted by application code. |
Class | ExcessWrite |
The body IBodyProducer for a request tried to write data after indicating it had finished writing data. |
Class | HTTP11ClientProtocol |
HTTP11ClientProtocol is an implementation of the HTTP 1.1 client protocol. It supports as few features as possible. |
Class | HTTPClientParser |
An HTTP parser which only handles HTTP responses. |
Class | HTTPParser |
HTTPParser handles the parsing side of HTTP processing. With a suitable subclass, it can parse either the client side or the server side of the connection. |
Class | LengthEnforcingConsumer |
An IConsumer proxy which enforces an exact length requirement on the total data written to it. |
Class | ParseError |
Some received data could not be parsed. |
Class | Request |
A Request instance describes an HTTP request to be sent to an HTTP server. |
Class | RequestNotSent |
No summary |
Class | TransportProxyProducer |
An twisted.internet.interfaces.IPushProducer implementation which wraps another such thing and proxies calls to it until it is told to stop. |
Class | WrongBodyLength |
An IBodyProducer declared the number of bytes it was going to produce (via its length attribute) and then produced a different number of bytes. |
Function | makeStatefulDispatcher |
No summary |
Constant | BODY |
Undocumented |
Constant | DONE |
Undocumented |
Constant | HEADER |
Undocumented |
Constant | STATUS |
Undocumented |
Class | _WrapperException |
_WrapperException is the base exception type for exceptions which include one or more other exceptions as the low-level causes. |
Function | _callAppFunction |
Call function. If it raises an exception, log it with a minimal description of the source. |
Function | _ensureValidMethod |
An HTTP method is an HTTP token, which consists of any visible ASCII character that is not a delimiter (i.e. one of "(),/:;<=>?@[\]{}.) |
Function | _ensureValidURI |
A valid URI cannot contain control characters (i.e., characters between 0-32, inclusive and 127) or non-ASCII characters (i.e., characters with values between 128-255, inclusive). |
Constant | _VALID_METHOD |
Undocumented |
Constant | _VALID_URI |
Undocumented |
Variable | _ClientRequestProxy |
Undocumented |
Variable | _moduleLog |
Undocumented |
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. |
Returns | |
None |
Parameters | |
method:bytes | the method to check |
Returns | |
bytes | the method if it is valid |
Raises | |
ValueError | if the method is not valid |
See Also | |
https://tools.ietf.org/html/rfc7230#section-3.1.1, https://tools.ietf.org/html/rfc7230#section-3.2.6, https://tools.ietf.org/html/rfc5234#appendix-B.1 |
Parameters | |
uri:bytes | the URI to check |
Returns | |
bytes | the URI if it is valid |
Raises | |
ValueError | if the URI is not valid |
See Also | |
https://tools.ietf.org/html/rfc3986#section-3.3, https://tools.ietf.org/html/rfc3986#appendix-A, https://tools.ietf.org/html/rfc5234#appendix-B.1 |
Undocumented
Value |
|