Skip to main content

HttpClient

Trait HttpClient 

Source
pub trait HttpClient:
    'static
    + Send
    + Sync {
    // Required method
    fn get(
        &self,
        url: &str,
        follow_redirects: bool,
    ) -> BoxFuture<'static, Result<HttpResponse>>;
}
Expand description

A trait for making HTTP requests.

Required Methods§

Source

fn get( &self, url: &str, follow_redirects: bool, ) -> BoxFuture<'static, Result<HttpResponse>>

Perform a GET request and return the full response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§