RequestDecorator

Trait RequestDecorator 

Source
pub trait RequestDecorator: Send {
    // Required method
    fn decorate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 mut Request,
    ) -> Pin<Box<dyn Future<Output = Result<(), RequestDecoratorError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

fn decorate<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 mut Request, ) -> Pin<Box<dyn Future<Output = Result<(), RequestDecoratorError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Decorates the given reqwest::Request.

This function can modify the request (e.g., add headers, sign the request) before it is sent.

§Arguments
  • request - A mutable reference to the reqwest::Request to decorate.

Implementors§