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.

Requests and responses can contain credentials in headers or bodies. Implementations must not log or include their raw contents in Debug output or returned errors.

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".

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§