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

class documentation

`class _ReadBodyProtocol(protocol.Protocol): (source)`

View In Hierarchy

Protocol that collects data sent to it.

This is a helper for `IResponse.deliverBody`, which collects the body and fires a deferred with it.

Method | `__init__` | No summary
Method | `connectionLost` | Deliver the accumulated response bytes to the waiting `Deferred`, if the response body has been completely received without error.
Method | `dataReceived` | Accumulate some more bytes from the response.
Instance Variable | `dataBuffer` | list of byte-strings received
Instance Variable | `deferred` | See `__init__`.
Instance Variable | `message` | See `__init__`.
Instance Variable | `status` | See `__init__`.

Inherited from `Protocol`:

Method | `logPrefix` | Return a prefix matching the class name, to identify log messages related to this protocol instance.
Class Variable | `factory` | Undocumented

Inherited from `BaseProtocol` (via `Protocol`):

Method | `connectionMade` | Called when a connection is made.
Method | `makeConnection` | Make a connection to a transport and a server.
Instance Variable | `connected` | Undocumented
Instance Variable | `transport` | Undocumented

def __init__(self, status, message, deferred): (source)

Parameters
status | Status of `IResponse`
message:`bytes` | Message of `IResponse`
deferred:`Deferred` firing with `bytes` | deferred to fire when response is complete

def connectionLost(self, reason): (source)
from `twisted.internet.interfaces.IProtocol`
overrides `twisted.internet.protocol.Protocol.connectionLost`

Deliver the accumulated response bytes to the waiting `Deferred`, if the response body has been completely received without error.

def dataReceived(self, data): (source)
from `twisted.internet.interfaces.IProtocol`
overrides `twisted.internet.protocol.Protocol.dataReceived`

Accumulate some more bytes from the response.

dataBuffer: `list` of `bytes` = (source)

list of byte-strings received

deferred = (source)

See `__init__`.

message = (source)

See `__init__`.

status = (source)

See `__init__`.