std.net.http
HTTP 1.1 clients and servers.
Support for HTTP 1.1 is implemented conforming to the following RFCs:
- HTTP Semantics
- HTTP/1.1
- HTTP State Management Mechanism
- Returning Values from Forms: multipart/form-data
- The 'Basic' HTTP Authentication Scheme
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 | ||
| Value | Limits | Size/amount limitations to apply when parsing HTTP messages. |
| Value | Method | 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 | |
| Request | An HTTP request parsed from some input stream. | |
| Response | An HTTP response parsed from some input stream. | |
| Value | Status | The status code of a response. |
| Value | Version | The protocol version of a request or response. |