Request #
This module provides the Request type, which represents an HTTP request. It also defines ways
to build a Request using functions that make it easier.
References:
The main parts of a request containing the HTTP method, version, and request target URI.
Reference: https://httpwg.org/specs/rfc9112.html#request.line
- method : Method
The HTTP method (GET, POST, PUT, DELETE, etc.) for the request
Reference: https://httpwg.org/specs/rfc9112.html#rfc.section.3.1
- version : Version
The HTTP protocol version for the request (e.g. HTTP/1.1, HTTP/2.0, HTTP/3.0).
Reference: https://httpwg.org/specs/rfc9112.html#http.version
- uri : RequestTarget
The raw request-target string (commonly origin-form path/query,
"*", or authority-form). - headers : Headers
Collection of HTTP headers for the request (Content-Type, Authorization, etc.).
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
HTTP request structure parameterized by body type.
- line : Head
- body : t
The request body content of type t.
- extensions : Extensions
Optional dynamic metadata attached to the request.
Instances For
Equations
Builds an HTTP Request.
- line : Head
The request-line of an HTTP request.
- extensions : Extensions
Optional dynamic metadata attached to the request.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Creates a new HTTP request builder with the default head
(method: GET, version: HTTP/1.1, target: *).
Equations
Instances For
Sets the HTTP method for the request being built.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sets the HTTP version for the request being built.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sets the request target/URI for the request being built.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sets the request target/URI for the request being built
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sets the headers for the request being built
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adds a single header to the request being built.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adds a single header to the request being built, panics if the header is invalid.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adds a header to the request being built only if the Option Header.Value is some.
Instances For
Creates a new HTTP GET Request with the specified URI.
Equations
Instances For
Creates a new HTTP POST Request builder with the specified URI.
Equations
Instances For
Creates a new HTTP PUT Request builder with the specified URI.
Equations
Instances For
Creates a new HTTP DELETE Request builder with the specified URI.
Equations
Instances For
Creates a new HTTP PATCH Request builder with the specified URI.
Equations
Instances For
Creates a new HTTP HEAD Request builder with the specified URI.
Equations
Instances For
Creates a new HTTP OPTIONS Request builder with the specified URI.
Use Request.options (RequestTarget.asteriskForm) for server-wide OPTIONS.
Equations
Instances For
Creates a new HTTP CONNECT Request builder with the specified URI.
Typically used with RequestTarget.authorityForm for tunneling.
Equations
Instances For
Creates a new HTTP TRACE Request builder with the specified URI.