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.
- Byte
Range 🔒 - The bytes of a file from
fromup to, but not including,to, or to the end of the file whentoisNone.
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-Rangesuch asbytes 100-199/200starts, and the whole file’s length when it says, which*doesn’t. - get 🔒
- Asks for
url, or justrangeof it, sendingheaderstoo, 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, whichAnswer::starts_atshows. - headers 🔒
- Reads each of
lines, writtenName: 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.