Module http

Source
Expand description

A module for executing HTTP requests using a client that operates within the host runtime. Functions are synchronous from the guest’s perspective, yet they run asynchronously on the host side. While waiting for request completion, the host thread can execute other tasks concurrently.

Structs§

BatchHttpRequest
A structure representing a batch of HTTP requests.
HttpRequest
A struct that represents an HTTP request.
HttpRequestBuilder
A builder for constructing an HttpRequest.
HttpResponse
A struct that represents an HTTP response.
JsonDeserializeError
This type represents all possible errors that can occur when serializing or deserializing JSON data.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Url
A parsed URL record.

Enums§

HttpError
An HTTP error.
HttpMethod
The HTTP method.
HttpVersion
The HTTP version.

Functions§

execute
Executes a single HTTP request and returns a result containing either an HttpResponse or an HttpError.
execute_many
Executes multiple HTTP requests in a batch and returns their results.