// This will POST a body of `{"lang":"rust","body":"json"}`
let mut map = HashMap::new();
map.insert("lang", "rust");
map.insert("body", "json");
let client = reqwest::Client::new();
let res = client.post("http://httpbin.org/post")
.json(&map)
.send()
.await?;
What about nested JSON, i.e. params fields?
I want to do the equivalent of this:
Is there a way to just pass a json object https://github.com/serde-rs/json