Search bar offers the following options:
Term presence. The below example searches for documents that
must contain “foo”, might contain “bar” and must not contain “baz”:
+foo bar -baz
Wildcards. The below example searches for documents with words beginning with “foo”:
Search in specific fields. The following search matches all objects
in "twisted.mail" that matches “search”:
Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.
Fuzzy matches. The following search matches all documents
that have a word within 1 edit distance of “foo”:
Results provided by Lunr.js
class IAgent(Interface): (source)
An agent makes HTTP requests.
The way in which requests are issued is left up to each implementation. Some may issue them directly to the server indicated by the net location portion of the request URL. Others may use a proxy specified by system configuration.
Processing of responses is also left very widely specified. An implementation may perform no special handling of responses, or it may implement redirect following or content negotiation, it may implement a cookie store or automatically respond to authentication challenges. It may implement many other unforeseen behaviors as well.
It is also intended that
IAgent implementations be composable. An implementation which provides cookie handling features should re-use an implementation that provides connection pooling and this combination could be used by an implementation which adds content negotiation functionality. Some implementations will be completely self-contained, such as those which actually perform the network operations to send and receive requests, but most or all other implementations should implement a small number of new features (perhaps one new feature) and delegate the rest of the request/response machinery to another implementation.
This allows for great flexibility in the behavior an
IAgent will provide. For example, an
IAgent with web browser-like behavior could be obtained by combining a number of (hypothetical) implementations:
baseAgent = Agent(reactor) decode = ContentDecoderAgent(baseAgent, [(b"gzip", GzipDecoder())]) cookie = CookieAgent(decode, diskStore.cookie) authenticate = AuthenticateAgent( cookie, [diskStore.credentials, GtkAuthInterface()]) cache = CacheAgent(authenticate, diskStore.cache) redirect = BrowserLikeRedirectAgent(cache, limit=10) doSomeRequests(cache)
||Request the resource at the given location.|
Optional[= None, bodyProducer:
Optional[= None) ->
Deferred[: (source) ¶
Request the resource at the given location.
|method:||The request method to use, such as b"GET", b"HEAD", b"PUT", b"POST", etc.|
|uri:||The location of the resource to request. This should be an absolute URI but some implementations may support relative URIs (with absolute or relative paths). HTTP and HTTPS are the schemes most likely to be supported but others may be as well.|
|headers:||The headers to send with the request (or |
|body||An object which can generate bytes to make up the body of this request (for example, the properly encoded contents of a file for a file upload). Or, |