Skip to navigation
How to convert actix_web::web::Bytes to json
19.09.22
let res = client.post("https://foo.com/token") .insert_header(("User-Agent", "Actix-web")) .insert_header(("Authorization", "Bearer xxxxxx")) .insert_header(("Content-Type", "application/x-www-form-urlencoded")) .send_body("scope=3070501") .await; let s = res.unwrap().json::
().await.unwrap(); println!(" {:?}", s["access_token"]);
https://docs.rs/awc/latest/awc/struct.ClientResponse.html
Reply
Anonymous
Information Epoch 1745563803
Data dominates.
Home
Notebook
Contact us