We need to add the following dependencies:
cargo add tokio --features full
cargo add warp
cargo add serde_json
In this video I show you how to do HTTP requests with the reqwest
crate.
I will use the server programs from the previous video 24. as server
for this video.
We use the reqwest
crate as well as the tokio
asynchronous runtime:
Rust has excellent serialization and deserialization support via the
serde
crate: https://docs.rs/serde/latest/serde/
For the examples in this video we need the following in Cargo.toml
:
[dependencies]
serde = { version = "1.0.195", features = ["derive"] }