Struct rusoto_core::signature::SignedRequest[][src]

pub struct SignedRequest {
    pub method: String,
    pub service: String,
    pub region: Region,
    pub path: String,
    pub headers: BTreeMap<String, Vec<Vec<u8>>>,
    pub params: Params,
    pub scheme: Option<String>,
    pub hostname: Option<String>,
    pub payload: Option<SignedRequestPayload>,
    pub canonical_query_string: String,
    pub canonical_uri: String,
}

A data structure for all the elements of an HTTP request that are involved in the Amazon Signature Version 4 signing process

Fields

The HTTP Method

The AWS Service

The AWS Region

The HTTP request path

The HTTP Request Headers

The HTTP request paramaters

The HTTP/HTTPS protocol

The AWS hostname

The HTTP Content

The Standardised query string

The Standardised URI

Methods

impl SignedRequest
[src]

Default constructor

Sets the value of the "content-type" header.

Sets the target hostname

Sets the target hostname using the current service type and region

See the implementation of build_hostname to see how this is done

Sets the new body (payload)

Sets the new body (payload) as a stream

Computes and sets the Content-MD5 header based on the current payload.

Has no effect if the payload is not set, or is not a buffer.

Returns the current HTTP method

Returns the current path

Invokes canonical_uri(path) to return a canonical path

Returns the current canonical URI

Returns the current query string

Converts a paramater such as "example param": "examplekey" into "&example+param=examplekey"

Returns the current headers

Returns the current http scheme (https or http)

Converts hostname to String if it exists, else it invokes build_hostname()

If the key exists in headers, set it to blank/unoccupied:

Add a value to the array of headers for the specified key. Headers are kept sorted by key name for use at signing (BTreeMap)

Adds parameter to the HTTP Request

Sets paramaters with a given variable of Params type

http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html

Signs the request using Amazon Signature version 4 to verify identity. Authorization header uses AWS4-HMAC-SHA256 for signing.

Signs the request using Amazon Signature version 4 to verify identity. Authorization header uses AWS4-HMAC-SHA256 for signing.

Trait Implementations

impl Debug for SignedRequest
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations