[−][src]Struct rusoto_core::signature::SignedRequest
A data structure for all the elements of an HTTP request that are involved in the Amazon Signature Version 4 signing process
Fields
method: String
The HTTP Method
service: String
The AWS Service
region: Region
The AWS Region
path: String
The HTTP request path
headers: BTreeMap<String, Vec<Vec<u8>>>
The HTTP Request Headers
params: Params
The HTTP request paramaters
scheme: Option<String>
The HTTP/HTTPS protocol
hostname: Option<String>
The AWS hostname
payload: Option<SignedRequestPayload>
The HTTP Content
canonical_query_string: String
The Standardised query string
canonical_uri: String
The Standardised URI
Methods
impl SignedRequest
[src]
pub fn new(
method: &str,
service: &str,
region: &Region,
path: &str
) -> SignedRequest
[src]
method: &str,
service: &str,
region: &Region,
path: &str
) -> SignedRequest
Default constructor
pub fn set_content_type(&mut self, content_type: String)
[src]
Sets the value of the "content-type" header.
pub fn set_hostname(&mut self, hostname: Option<String>)
[src]
Sets the target hostname
pub fn set_endpoint_prefix(&mut self, endpoint_prefix: String)
[src]
Sets the target hostname using the current service type and region
See the implementation of build_hostname to see how this is done
pub fn set_payload<B: Into<Bytes>>(&mut self, payload: Option<B>)
[src]
Sets the new body (payload)
pub fn set_payload_stream(&mut self, stream: ByteStream)
[src]
Sets the new body (payload) as a stream
pub fn set_content_md5_header(&mut self)
[src]
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.
pub fn method(&self) -> &str
[src]
Returns the current HTTP method
pub fn path(&self) -> &str
[src]
Returns the current path
pub fn canonical_path(&self) -> String
[src]
Invokes canonical_uri(path)
to return a canonical path
pub fn canonical_uri(&self) -> &str
[src]
Returns the current canonical URI
pub fn canonical_query_string(&self) -> &str
[src]
Returns the current query string
Converts a paramater such as "example param": "examplekey" into "&example+param=examplekey"
pub fn headers(&self) -> &BTreeMap<String, Vec<Vec<u8>>>
[src]
Returns the current headers
pub fn scheme(&self) -> String
[src]
Returns the current http scheme (https or http)
pub fn hostname(&self) -> String
[src]
Converts hostname to String if it exists, else it invokes build_hostname()
pub fn remove_header(&mut self, key: &str)
[src]
If the key exists in headers, set it to blank/unoccupied:
pub fn add_header<K: ToString>(&mut self, key: K, value: &str)
[src]
Add a value to the array of headers for the specified key. Headers are kept sorted by key name for use at signing (BTreeMap)
pub fn add_param<S>(&mut self, key: S, value: S) where
S: Into<String>,
[src]
S: Into<String>,
Adds parameter to the HTTP Request
pub fn set_params(&mut self, params: Params)
[src]
Sets paramaters with a given variable of Params
type
pub fn generate_presigned_url(
&mut self,
creds: &AwsCredentials,
expires_in: &Duration,
should_sha256_sign_payload: bool
) -> String
[src]
&mut self,
creds: &AwsCredentials,
expires_in: &Duration,
should_sha256_sign_payload: bool
) -> String
Generate a Presigned URL for AWS
See the documentation for more information.
pub fn sign(&mut self, creds: &AwsCredentials)
[src]
Signs the request using Amazon Signature version 4 to verify identity. Authorization header uses AWS4-HMAC-SHA256 for signing.
pub fn sign_with_plus(
&mut self,
creds: &AwsCredentials,
should_treat_plus_literally: bool
)
[src]
&mut self,
creds: &AwsCredentials,
should_treat_plus_literally: bool
)
Signs the request using Amazon Signature version 4 to verify identity. Authorization header uses AWS4-HMAC-SHA256 for signing.
Trait Implementations
Auto Trait Implementations
impl Send for SignedRequest
impl !Sync for SignedRequest
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self