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`.`_RetryingHTTP11ClientProtocol``

class documentation

`class _RetryingHTTP11ClientProtocol: (source)`

View In Hierarchy

A wrapper for `HTTP11ClientProtocol` that automatically retries requests.

Method | `__init__` | Undocumented
Method | `request` | Do a request, and retry once (with a new connection) if it fails in a retryable manner.
Method | `_shouldRetry` | Indicate whether request should be retried.
Instance Variable | `_clientProtocol` | The underlying `HTTP11ClientProtocol`.
Instance Variable | `_newConnection` | A callable that creates a new connection for a retry.

def __init__(self, clientProtocol, newConnection): (source)

Undocumented

def request(self, request): (source)

Do a request, and retry once (with a new connection) if it fails in a retryable manner.

Parameters
request | A `Request` instance that will be requested using the wrapped protocol.

def _shouldRetry(self, method, exception, bodyProducer): (source)

Indicate whether request should be retried.

Only returns `True` if method is idempotent, no response was received, the reason for the failed request was not due to user-requested cancellation, and no body was sent. The latter requirement may be relaxed in the future, and PUT added to approved method list.

Parameters
method:`bytes` | The method of the request.
exception | Undocumented
bodyProducer | Undocumented

_clientProtocol = (source)

The underlying `HTTP11ClientProtocol`.

_newConnection = (source)

A callable that creates a new connection for a retry.