Client and server implementations of HTTP/1.x.
New in version 3.3.
Parameters for HTTP1Connection and HTTP1ServerConnection.
Parameters: |
|
---|
Implements the HTTP/1.x protocol.
This class can be on its own for clients, or via HTTP1ServerConnection for servers.
Parameters: |
|
---|
Read a single HTTP response.
Typical client-mode usage is to write a request using write_headers, write, and finish, and then call read_response.
Parameters: | delegate – a HTTPMessageDelegate |
---|
Returns a Future that resolves to None after the full response has been read.
Sets a callback that will be run when the connection is closed.
Deprecated since version 3.3: Use HTTPMessageDelegate.on_connection_close instead.
Take control of the underlying stream.
Returns the underlying IOStream object and stops all further HTTP processing. May only be called during HTTPMessageDelegate.headers_received. Intended for implementing protocols like websockets that tunnel over an HTTP handshake.
Sets the body timeout for a single request.
Overrides the value from HTTP1ConnectionParameters.
Sets the body size limit for a single request.
Overrides the value from HTTP1ConnectionParameters.
Implements HTTPConnection.write_headers.
Implements HTTPConnection.write.
For backwards compatibility is is allowed but deprecated to skip write_headers and instead call write() with a pre-encoded header block.
Implements HTTPConnection.finish.
An HTTP/1.x server.
Parameters: |
|
---|
Closes the connection.
Returns a Future that resolves after the serving loop has exited.
Starts serving requests on this connection.
Parameters: | delegate – a HTTPServerConnectionDelegate |
---|