class Awscr::Signer::V4::Request

Overview

Represents a request. It can have headers and query params.

request = Request.new("GET", URI.parse("/"), "")
request.headers.add(Header.new("k", "v"))
request.headers.to_a
request.params.add("k", "v")
request.to_s

Defined in:

awscr-signer/v4/request.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(method : String, path : String, body : IO | String | Nil, encode : Bool = true) #

[View source]

Class Method Detail

def self.encode_path(path) #

Encodes the path except '/' and '~'


[View source]

Instance Method Detail

def body : IO #

The request body


[View source]
def date #

The time of the request


[View source]
def digest : String #

The computed digest of the request body


[View source]

The collection of Headers. Held in a HeaderCollection


[View source]
def host #

[View source]

The collection of query string paramters. Held in a QueryString


[View source]
def to_s(io : IO) #

Returns the request as a String.


[View source]