Skip to main content

Module http

Module http 

Source
Expand description

HTTP server: HTTP/1.1 + HTTP/2 over TCP, optional HTTP/3 over QUIC.

Modulesยง

h3 ๐Ÿ”’
HTTP/3 over QUIC via h3 / h3-quinn.
h1h2 ๐Ÿ”’
HTTP/1.1 and HTTP/2 over TCP via hyper.

Structsยง

HttpConfig
HTTP settings for http:// endpoints, set with ServerBuilder::http_config.
HttpServer ๐Ÿ”’
HTTP server (TCP for h1/h2, optional QUIC for h3).

Constantsยง

ERR_BODY_TOO_LARGE ๐Ÿ”’
ERR_ENCODE_RESPONSE ๐Ÿ”’
ERR_METHOD_NOT_ALLOWED ๐Ÿ”’
ERR_READ_BODY ๐Ÿ”’
MAX_HTTP_BODY_SIZE ๐Ÿ”’
Max HTTP request body size (1 MB).

Traitsยง

HttpAcceptor ๐Ÿ”’
Runs an HTTP server. Hides the codec type, like AsyncAcceptor does for the stream transports.

Functionsยง

encode_response ๐Ÿ”’
Encode a JSON-RPC response with the server codec.
json_response ๐Ÿ”’
Response with one of the pre-encoded JSON error bodies (ERR_*).
json_response_bytes ๐Ÿ”’
Response with a codec-encoded body.
parse_error_response ๐Ÿ”’
Build the JSON-RPC parse error response.