pub trait VssHeaderProvider: Send + Sync {
// Required method
fn get_headers<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, VssHeaderProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Defines a trait around how headers are provided for each VSS request.
Required Methods§
Sourcefn get_headers<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, VssHeaderProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_headers<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, VssHeaderProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the HTTP headers to be used for a VSS request. This method is called on each request, and should likely perform some form of caching.
A reference to the serialized request body is given as request
.
It can be used to perform operations such as request signing.