Skip to main content

HttpSend

Trait HttpSend 

Source
pub trait HttpSend:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn http_send(
        &self,
        req: Request<Bytes>,
    ) -> impl Future<Output = Result<Response<Bytes>>> + MaybeSend;
}
Expand description

HttpSend is used to send http request during the signing process.

For example, fetch IMDS token from AWS or OAuth2 refresh token. This trait is designed especially for the signer, please don’t use it as a general http client.

Required Methods§

Source

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

Send http request and return the response.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: HttpSendDyn + ?Sized> HttpSend for Arc<T>

Source§

async fn http_send(&self, req: Request<Bytes>) -> Result<Response<Bytes>>

Implementors§