pub trait SimpleHttpClient: Send + Sync {
// Required method
fn get_text<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(StatusCode, Bytes), SpiderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A simple HTTP client trait for fetching web content.
Required Methods§
Sourcefn get_text<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(StatusCode, Bytes), SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_text<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(StatusCode, Bytes), SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches the content of a URL as text.