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§
Sourcefn 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,
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 thereqwest::Requestto decorate.