Skip to main content

Module http

Module http 

Source
Expand description

Talking to web servers: the client every download uses, and what a server says about a file before sending it.

Structs§

Answer 🔒
What a server said about the file before its body.
ByteRange 🔒
The bytes of a file from from up to, but not including, to, or to the end of the file when to is None.

Enums§

BadHeader 🔒
A header an app asked for that can’t be sent.

Constants§

CONNECT_TIMEOUT 🔒
How long connecting, and then waiting for the server to start answering, may take.
RESPONSE_TIMEOUT 🔒

Functions§

agent 🔒
content_range 🔒
Where a Content-Range such as bytes 100-199/200 starts, and the whole file’s length when it says, which * doesn’t.
get 🔒
Asks for url, or just range of it, sending headers too, giving what the server said and the body still to read. A server that can’t send part of a file sends all of it, which Answer::starts_at shows.
headers 🔒
Reads each of lines, written Name: value, as a header to send.

Type Aliases§

Headers 🔒
The headers an app adds to each of a download’s requests, shared by its connections.