Skip to main content

Module http

Module http 

Source

Structs§

BytesBody
A body already in memory, handed out in CHUNK_LEN-sized pieces.
HttpControl
Cancellation and progress shared with an in-flight request.
HttpProgress
How much of a transfer has arrived.
HttpRequest
One request.
HttpResponse
What a server answered, with its body still to be read.
StubHttpClient
An HTTP client that answers from a function rather than a network.

Enums§

HttpError
HttpMethod
The verbs a request can use.

Traits§

CancelTransfer
A transfer that stops at once when its HttpControl is cancelled, registered with HttpControl::on_cancel by the backend running it.
HttpBody
A response body, read a chunk at a time.
HttpClient
A platform’s HTTP.
PlatformDownloader
A platform’s own transfer for HttpClient::download_to, one that goes on while the application is suspended or closed.

Functions§

default_http_client
The platform’s HTTP client.
downloaded_length
How much of a download into target is on the device: the file’s length, or more where the platform keeps a paused transfer’s bytes apart from the file, as iOS does. An application shows a paused download’s progress with it.
http_body_ref
Wraps body in an HttpBodyRef.
local_http_client
map_ordered_concurrent
set_platform_downloader
Installs the platform’s downloader; default_http_client then runs download_to through it. iOS installs one on a background URLSession.

Type Aliases§

HttpBodyRef
Shared handle to a response body.
HttpClientRef
HttpFuture
ProgressHandler
What a progress report is handed to.
StubAnswer
What a StubHttpClient answers a request with.