Fwetch
Uses Reqwest by Franklin Blanco
Brought to you from the javascript world, this is a fetch() implementation. But as the name suggests, it utilizes reqwest.
How to use this crate?
Useful features:
Fwetch
// Say you have a struct
// <-- This is from serde (serde.rs)
// If this panics you will get more context regarding what happened than you usually would with reqwest.
let person: Person = fwetch.await.unwrap;
// You can now use this struct freely.
Interopability with Actix-web (Optional feature called "actix"). Enable by adding to your Cargo.toml
[]
= { = "0", = ["all"] }
This allows you to create a proxy with two lines of code! Convert an actix request into a reqwest with convert_actix_request_to_reqwest() and send it with forward_request()
use ;
use Value;
use ;
async
Known issues with Reqwest
If you get a compilation error that's really long and confusing, it's probably because you don't have openssl (or at least the version reqwest needs). Solution: (Cargo.toml)
[]
= { = "0.10", = ["vendored"] }