Skip to main content

Module http

Module http 

Source
Expand description

HTTP protocol support.

This module contains HTTP request and response types, HTTP/1 and HTTP/2 services, payload streaming, protocol configuration, and common header types.

Re-exports§

pub use self::error::ResponseError;

Modules§

body
Traits and structures to aid consuming and writing HTTP payloads.
encoding
Content-Encoding support
error
HTTP-related errors.
h1
HTTP/1 protocol services, codecs, payload decoding, and lifecycle control.
h2
HTTP/2 implementation
header
Various http headers
test
Test helpers to use during testing.

Structs§

DateService
Generates the cached HTTP Date header used by the protocol encoders.
HeaderItem
A parsed header that preserves its original name and value.
HeaderMap
A multimap of HTTP header names to values.
HttpService
An HTTP/1.1 and HTTP/2 transport service.
HttpServiceConfig
Configuration shared by HTTP/1 and HTTP/2 server services.
Method
The Request Method (VERB)
Request
An HTTP request.
RequestHead
The parsed metadata for an HTTP request.
Response
An HTTP response.
ResponseBuilder
An HTTP response builder
ResponseHead
The metadata for an HTTP response.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Version
Represents a version of the HTTP spec.

Enums§

ConnectionType
The connection behavior selected for an HTTP message.
HttpProtocol
HTTP protocol selected for an I/O stream.
KeepAlive
Server keep-alive behavior.
Payload
An HTTP request payload.

Constants§

ALPN_PROTOS
ALPN protocol identifiers for negotiating HTTP/2 or HTTP/1.1.
ALPN_PROTO_H1
ALPN protocol identifiers for HTTP/1.1.
ALPN_PROTO_H2
ALPN protocol identifiers for HTTP/2.

Traits§

HttpMessage
Common operations for HTTP requests and responses.

Functions§

openssl
Wraps an HTTP service in an OpenSSL TLS acceptor.
rustls
Creates a rustls-based HTTP service.

Type Aliases§

PayloadStream
A boxed stream of HTTP payload chunks.