Test HTTP/2 support.

Class FrameFactory A class containing lots of helper methods and state to build frames. This allows test cases to easily build correct HTTP/2 frames to feed to hyper-h2.
Class FrameBuffer A test object that converts data received from Twisted's HTTP/2 stack and turns it into a sequence of hyperframe frame objects.
Function buildRequestFrames No summary
Function buildRequestBytes Provides the byte sequence for a collection of HTTP/2 frames representing the provided request.
Function framesFromBytes Given a sequence of bytes, decodes them into frames.
Class ChunkedHTTPHandler A HTTP request object that writes chunks of data back to the network based on the URL.
Class ConsumerDummyHandler No summary
Class AbortingConsumerDummyHandler No summary
Class DummyProducerHandler An HTTP request handler that registers a dummy producer to serve the body.
Class NotifyingRequestFactory No summary
Class HTTP2TestHelpers A superclass that contains no tests but provides test helpers for HTTP/2 tests.
Class HTTP2ServerTests No class docstring; 33/33 methods documented
Class H2FlowControlTests Tests that ensure that we handle HTTP/2 flow control limits appropriately.
Class HTTP2TransportChecking No class docstring; 4/4 methods documented
Class HTTP2SchedulingTests The H2Connection object schedules certain events (mostly its data sending loop) using callbacks from the reactor. These tests validate that the calls are scheduled correctly.
Class HTTP2TimeoutTests The H2Connection object times out idle connections.
def buildRequestFrames(headers, data, frameFactory=None, streamID=1):

Provides a sequence of HTTP/2 frames that encode a single HTTP request. This should be used when you want to control the serialization yourself, e.g. because you want to interleave other frames with these. If that's not necessary, prefer buildRequestBytes.

ParametersheadersThe HTTP/2 headers to send. (type: list of tuple of bytes)
dataThe HTTP data to send. Each list entry will be sent in its own frame. (type: list of bytes)
frameFactoryThe FrameFactory that will be used to construct the frames. (type: FrameFactory)
streamIDThe ID of the stream on which to send the request. (type: int)
def buildRequestBytes(headers, data, frameFactory=None, streamID=1):

Provides the byte sequence for a collection of HTTP/2 frames representing the provided request.

ParametersheadersThe HTTP/2 headers to send. (type: list of tuple of bytes)
dataThe HTTP data to send. Each list entry will be sent in its own frame. (type: list of bytes)
frameFactoryThe FrameFactory that will be used to construct the frames. (type: FrameFactory)
streamIDThe ID of the stream on which to send the request. (type: int)
def framesFromBytes(data):

Given a sequence of bytes, decodes them into frames.

Note that this method should almost always be called only once, before making some assertions. This is because decoding HTTP/2 frames is extremely stateful, and this function doesn't preserve any of that state between calls.

ParametersdataThe serialized HTTP/2 frames. (type: bytes)
ReturnsA list of HTTP/2 frames. (type: list of hyperframe.frame.Frame subclasses.)
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.