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

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

No interface docstring
Method writeIntermediateResponse Write a non-terminating response.
Method writeHeaders Write a final response.
Method write Write some data.
Method finish Finish the request, and clean up the connection if necessary.
Method abortConnection Forcibly abort the connection without cleanly closing.
Method registerProducer Register a producer with the standard API.
Method unregisterProducer Unregister a producer.
Method getHostInfo No summary
Method getRemoteHost Returns an address of the remote host.
Attribute persistent Whether this request supports HTTP connection persistence. May be set to False. Should not be set to other values.
def writeIntermediateResponse(code, headers=None): (source)

Write a non-terminating response.

Intermediate responses cannot contain data. If the channel does not support intermediate responses, do nothing.
ParameterscodeThe response code. Should be in the 1xx range. (type: int )
headersthe headers to send in the response (type: twisted.web.http_headers.Headers )
def writeHeaders(code, headers): (source)
Write a final response.
ParameterscodeThe response code. Should not be in the 1xx range. (type: int )
headersthe headers to send in the response. They will be augmented with any connection-oriented headers as necessary for the protocol. (type: twisted.web.http_headers.Headers )
def write(data): (source)
Write some data.
Parametersdatathe data bytes (type: str )
def finish(): (source)
Finish the request, and clean up the connection if necessary.
def abortConnection(): (source)

Forcibly abort the connection without cleanly closing.

Use if, for example, you can't write all the data you promised.
def registerProducer(producer, streaming): (source)
Register a producer with the standard API.
def unregisterProducer(): (source)
Unregister a producer.
def getHostInfo(): (source)
Returns a tuple of (address, socket user connected to, boolean, was it secure). Note that this should not necessarily always return the actual local socket information from twisted. E.g. in a CGI, it should use the variables coming from the invoking script.
def getRemoteHost(): (source)

Returns an address of the remote host.

Like getHostInfo, this information may come from the real socket, or may come from additional information, depending on the transport.
persistent =
Whether this request supports HTTP connection persistence. May be set to False. Should not be set to other values.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:12:41.