Trait HttpRequestor

Source
pub trait HttpRequestor:
    Debug
    + Send
    + Sync {
    // Required method
    fn http_get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Box<[u8]>, HttpRequestError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Abstraction for an HTTP client that performs HTTP GET with serializable request data.

Required Methods§

Source

fn http_get<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Box<[u8]>, HttpRequestError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Performs HTTP GET query to the given URL and gets the JSON response.

Implementors§