Trait HttpClient
Source pub trait HttpClient:
'static
+ Send
+ Sync {
// Required methods
fn type_name(&self) -> &'static str;
fn send(
&self,
req: Request<AsyncBody>,
) -> BoxFuture<'static, Result<Response<AsyncBody>>>;
fn proxy(&self) -> Option<&Url>;
// Provided methods
fn get<'a>(
&'a self,
uri: &str,
body: AsyncBody,
follow_redirects: bool,
) -> BoxFuture<'a, Result<Response<AsyncBody>>> { ... }
fn post_json<'a>(
&'a self,
uri: &str,
body: AsyncBody,
) -> BoxFuture<'a, Result<Response<AsyncBody>>> { ... }
}