Go to the latest version of this document.
search in docstrings

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”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +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”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`web`.`client`.`ContentDecoderAgent``

class documentation

`class ContentDecoderAgent: (source)`

Implements interfaces: `twisted.web.iweb.IAgent`

View In Hierarchy

An `Agent` wrapper to handle encoded content.

It takes care of declaring the support for content in the Accept-Encoding header and automatically decompresses the received data if the Content-Encoding header indicates a supported encoding.

For example:

        agent = ContentDecoderAgent(Agent(reactor),
                                    [(b'gzip', GzipDecoder)])

Parameters
agent | The agent to wrap
decoders | A sequence of (name, decoder) objects. The name declares which encoding the decoder supports. The decoder must accept an `IResponse` and return an `IResponse` when called. The order determines how the decoders are advertised to the server. Names must be unique.not be duplicated.
See Also
`GzipDecoder`
Present Since
11.1

Method | `__init__` | Undocumented
Method | `request` | Send a client request which declares supporting compressed content.
Method | `_handleResponse` | Check if the response is encoded, and wrap it to handle decompression.
Instance Variable | `_agent` | Undocumented
Instance Variable | `_decoders` | Undocumented
Instance Variable | `_supported` | Undocumented

def __init__(self, agent, decoders): (source)

Undocumented

def request(self, method, uri, headers=None, bodyProducer=None): (source)
from `twisted.web.iweb.IAgent`

Send a client request which declares supporting compressed content.

See Also
`Agent.request`.

def _handleResponse(self, response): (source)

Check if the response is encoded, and wrap it to handle decompression.

_agent = (source)

Undocumented

_decoders = (source)

Undocumented

_supported = (source)

Undocumented