class documentation

class StubHTTPProtocol(Protocol): (source)

View In Hierarchy

A protocol like HTTP11ClientProtocol but which does not actually know HTTP/1.1 and only collects requests in a list.

Method __init__ Undocumented
Method request Capture the given request for later inspection.
Instance Variable requests A list of two-tuples. Each time a request is made, a tuple consisting of the request and the Deferred returned from the request method is appended to this list.
Instance Variable state Undocumented

Inherited from Protocol:

Method connectionLost Called when the connection is shut down.
Method dataReceived Called whenever data is received.
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): (source)

Undocumented

def request(self, request): (source)

Capture the given request for later inspection.

Returns
A Deferred which this code will never fire.
requests: List[Tuple[Request, Deferred[IResponse]]] = (source)

A list of two-tuples. Each time a request is made, a tuple consisting of the request and the Deferred returned from the request method is appended to this list.

Undocumented