Search results

There are no results.

std.net.http

HTTP 1.1 clients and servers.

Support for HTTP 1.1 is implemented conforming to the following RFCs:

Types for writing HTTP clients are provided by std.net.http.client while types for writing servers are provided by std.net.http.server. The std.net.http module provides the building blocks necessary for this, such as an HTTP request/response parser.

Chunked transfer support

Chunked transfers are fully supported, with two exceptions:

  • Trailer fields are not supported and their presence results in a parse error
  • Chunk extensions are parsed but ignored

Types

Body

The body of a response or request to read.

Etag

An ETag.

Header

An HTTP header.

HeaderMap

A mapping of HTTP headers and their values.

HeaderValue
ValueLimits

Size/amount limitations to apply when parsing HTTP messages.

ValueMethod

An HTTP request method.

ParseError

An error produced when parsing a request or response.

Parser

A type for parsing an HTTP requests and responses.

Reader

A type that wraps a Read[std.io.Error] and allows it to be used as the source of a Parser.

Request

An HTTP request parsed from some input stream.

Response

An HTTP response parsed from some input stream.

ValueStatus

The status code of a response.

ValueVersion

The protocol version of a request or response.