Function surf::client [−][src]
pub fn client() -> Client
Expand description
Construct a new Client
, capable of sending Request
s and running a middleware stack.
Examples
let client = surf::client();
let req = surf::get("https://httpbin.org/get");
let res = client.send(req).await?;