pub trait RequestSigner:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn sign(&self, request: &mut Request) -> SignerResult;
}Available on crate feature
async only.Expand description
Hook called for every outbound HTTP request just before transmission.
Implementations install request-level authentication: the default
ApiKeySigner adds x-api-key, the optional
BedrockSigner adds AWS sigv4
signing headers. Install a custom signer via
ClientBuilder::signer.
Signers run after per-request beta headers are merged but before the request is sent, so the canonical body and headers are visible for hashing.
Required Methods§
Sourcefn sign(&self, request: &mut Request) -> SignerResult
fn sign(&self, request: &mut Request) -> SignerResult
Sign request in place. Return an error to abort the request
before it is sent; the error is wrapped in
Error::Signing.
Implementors§
impl RequestSigner for BedrockSigner
Available on crate feature
bedrock only.impl RequestSigner for VertexSigner
Available on crate feature
vertex only.