Module http

Module http 

Source
Expand description

The HTTP module contains types for representing HTTP requests and responses in Rust. These types are Candid-encodable and are used by canisters that implement the HTTP interface required by the HTTP Gateway Protocol.

Structs§

HttpRequest
A Candid-encodable representation of an HTTP request. This struct is used by the http_request method of the HTTP Gateway Protocol’s Candid interface.
HttpRequestBuilder
An HTTP request builder.
HttpResponse
A Candid-encodable representation of an HTTP response. This struct is used by the http_request method of the HTTP Gateway Protocol’s Candid interface.
HttpResponseBuilder
An HTTP response builder.
HttpUpdateRequest
A Candid-encodable representation of an HTTP update request. This struct is used by the http_update_request method of the HTTP Gateway Protocol.
HttpUpdateResponse
A Candid-encodable representation of an HTTP update response. This struct is used by the http_update_request method of the HTTP Gateway Protocol.
Method
The Request Method (VERB)
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).

Type Aliases§

HeaderField
An HTTP header field, represented as a tuple of (name, value).