security_token_string

Function security_token_string 

Source
pub fn security_token_string(token: &str) -> String
Expand description

Get the security token string. It is always &X-Amz-Security-Token=token with percent encoding.

ยงExamples

use common_s3_headers::aws_format::security_token_string;

let result = security_token_string("token");
assert_eq!(result, "&X-Amz-Security-Token=token");

let result = security_token_string("token with spaces");
assert_eq!(result, "&X-Amz-Security-Token=token%20with%20spaces");

let result = security_token_string("token/with/slashes");
assert_eq!(result, "&X-Amz-Security-Token=token%2Fwith%2Fslashes")