Skip to content
Select theme

Talking to the network

Almost every useful Rust program talks to something over HTTP, and reqwest is what it talks with. The first request is four lines; the rest of the chapter is what happens when the network is not perfect.

Timeouts, retries, redirects, a body you have to read before you can see the error — all of it.