Skip to main content

HttpClient

Trait HttpClient 

Source
pub trait HttpClient: Send + Sync {
    // Required method
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

HTTP client abstraction for making API requests

Required Methods§

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Perform a GET request and return the response as JSON

Implementors§