Trait opendal::raw::HttpFetch

source ·
pub trait HttpFetch: Send + Sync + Unpin + 'static {
    // Required method
    fn fetch(
        &self,
        req: Request<Buffer>,
    ) -> impl Future<Output = Result<Response<HttpBody>>> + MaybeSend;
}
Expand description

HttpFetch is the trait to fetch a request in async way. User should implement this trait to provide their own http client.

Required Methods§

source

fn fetch( &self, req: Request<Buffer>, ) -> impl Future<Output = Result<Response<HttpBody>>> + MaybeSend

Fetch a request in async way.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl HttpFetch for Client

source§

async fn fetch(&self, req: Request<Buffer>) -> Result<Response<HttpBody>>

source§

impl<T: HttpFetchDyn + ?Sized> HttpFetch for Arc<T>

source§

async fn fetch(&self, req: Request<Buffer>) -> Result<Response<HttpBody>>

Implementors§