Skip to main content

sign_request

Function sign_request 

Source
fn sign_request(
    access_key_id: &str,
    access_key_secret: &str,
    logstore: &str,
    body: &[u8],
    date: &str,
) -> (Vec<(String, String)>, String)
Expand description

Builds the SLS request signature and the headers it covers.

Returns (headers, signature) where headers are the header pairs to send (including Authorization). body_md5 is the uppercase-hex MD5 of the request body; date is the RFC 1123 GMT timestamp. Split out from the network path so it is unit-testable with fixed inputs (mirrors the SLS signing spec).