module documentation
HTTP client.
Class |
|
Agent is a very basic HTTP client. It supports HTTP and HTTPS scheme URIs. |
Class |
|
SSL connection creator for web clients. |
Class |
|
An Agent wrapper which handles HTTP redirects in the same fashion as web browsers. |
Class |
|
An Agent wrapper to handle encoded content. |
Class |
|
CookieAgent extends the basic Agent to add RFC-compliant handling of HTTP cookies. Cookies are written to and extracted from a CookieJar instance. |
Class |
|
FileBodyProducer produces bytes from an input file object incrementally and writes them to a consumer. |
Class |
|
A wrapper for a Response instance which handles gzip'ed body. |
Class |
|
IPolicyForHTTPS that wraps a IPolicyForHTTPS and caches the created IOpenSSLClientConnectionCreator . |
Class |
|
A pool of persistent HTTP connections. |
Class |
|
An HTTP agent able to cross HTTP proxies. |
Class |
|
An Agent wrapper which handles HTTP redirects. |
Class |
|
A Response instance describes an HTTP response received from an HTTP server. |
Class | URI |
A URI object. |
Class |
|
This class is deprecated. Please simply use Agent as-is, or if you want to customize something, use BrowserLikePolicyForHTTPS . |
Exception |
|
Page was only partially downloaded, we got disconnected in middle. |
Exception |
|
There was an error while creating the bytes which make up a request. |
Exception |
|
There was an error while sending the bytes which make up a request. |
Exception |
|
ResponseDone may be passed to IProtocol.connectionLost on the protocol passed to Response.deliverBody and indicates that the entire response has been delivered. |
Exception |
|
ResponseFailed indicates that all of the response to a request was not received for some reason. |
Exception |
|
A ResponseFailed that knows no response bytes at all have been received. |
Function | read |
Get the body of an IResponse and return it as a byte string. |
Function | urlunparse |
Undocumented |
Class | _ |
Base class offering common facilities for Agent -type classes. |
Class | _ |
A _ContextFactoryWithContext is like a twisted.internet.ssl.ContextFactory with a pre-created context. |
Class | _ |
Adapt a web context factory to a normal context factory. |
Class | _ |
A fake urllib.request.Request object for cookiejar to work with. |
Class | _ |
A fake urllib.response.Response object for http.cookiejar to work with. |
Class | _ |
Undocumented |
Class | _ |
A Protocol implementation which wraps another one, transparently decompressing received data. |
Class | _ |
A factory for HTTP11ClientProtocol , used by HTTPConnectionPool . |
Class | _ |
Protocol that collects data sent to it. |
Class | _ |
A wrapper for HTTP11ClientProtocol that automatically retries requests. |
Class | _ |
Standard HTTP endpoint destinations - TCP for HTTP, TCP+TLS for HTTPS. |
Function | _make |
Create and connect an HTTP page getting factory. |
Function | _require |
The decorated method requires pyOpenSSL to be present, or it raises NotImplementedError . |
Function | _urljoin |
Construct a full ("absolute") URL by combining a "base URL" with another URL. Informally, this uses components of the base URL, in particular the addressing scheme, the network location and (part of) the path, to provide missing components in the relative URL. |
Variable | _default |
Undocumented |
Get the body of an IResponse
and return it as a byte string.
This is a helper function for clients that don't want to incrementally receive the body of an HTTP response.
Parameters | |
response:IResponse provider | The HTTP response for which the body will be read. |
Returns | |
defer.Deferred[ | A Deferred which will fire with the body of the response. Cancelling it will close the connection to the server immediately. |
Create and connect an HTTP page getting factory.
Any additional positional or keyword arguments are used when calling factoryFactory.
Parameters | |
url | Undocumented |
factory | Factory factory that is called with url, args and kwargs to produce the getter |
context | Context factory to use when creating a secure connection, defaulting to None |
*args | Undocumented |
**kwargs | Undocumented |
Returns | |
The factory created by factoryFactory |
The decorated method requires pyOpenSSL to be present, or it raises NotImplementedError
.
Parameters | |
decoratee:callable | A function which requires pyOpenSSL. |
Returns | |
callable | A function which raises NotImplementedError if pyOpenSSL is not installed; otherwise, if it is installed, simply return decoratee. |
Construct a full ("absolute") URL by combining a "base URL" with another URL. Informally, this uses components of the base URL, in particular the addressing scheme, the network location and (part of) the path, to provide missing components in the relative URL.
Additionally, the fragment identifier is preserved according to the HTTP 1.1 bis draft.
Parameters | |
base:bytes | Base URL. |
url:bytes | URL to combine with base. |
Returns | |
An absolute URL resulting from the combination of base and url. | |
See Also | |
urllib.parse.urljoin() | |
https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.2 |