Skip to main content

Module http

Module http 

Source
Expand description

The HTTP layer the client sends on, and the seam for replacing it.

Everything the SDK sends goes out through one HttpClient. The one it ships, ReqwestClient, is what crate::Client::new builds; an application that already has an HTTP stack — a mobile shell on the platform’s own, a test on a canned answer — implements the trait and hands it to crate::ClientBuilder::http_client.

The request and response types are the http crate’s, re-exported here so a caller needs no dependency of its own to name a Method or read a StatusCode.

Modules§

header
HTTP header types

Structs§

Body
A response body as it arrives, read once.
HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
Method
The Request Method (VERB)
Request
Represents an HTTP request.
ReqwestClientreqwest
The HttpClient the SDK ships, over reqwest with rustls and HTTP/2. This is what a client gets when nothing else is supplied.
Response
Represents an HTTP response
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Version
Represents a version of the HTTP spec.

Traits§

HttpClient
Sends one HTTP request and answers with the response, its body still unread.