t.w.i._IRequestEncoder(Interface) : interface documentation

Part of twisted.web.iweb View Source View In Hierarchy

Known implementations: twisted.web.server._GzipEncoder

An object encoding data passed to IRequest.write, for example for compression purpose.
Present Since12.3
Method encode Encode the data given and return the result.
Method finish Callback called when the request is closing.
def encode(data): (source)
Encode the data given and return the result.
ParametersdataThe content to encode. (type: str)
ReturnsThe encoded data. (type: str)
def finish(): (source)
Callback called when the request is closing.
ReturnsIf necessary, the pending data accumulated from previous encode calls. (type: str)
API Documentation for Twisted, generated by pydoctor at 2013-04-03 11:20:05.