Awscr::Signer::HeaderCollection
Inherits Enumerable < Reference < Object
An array like structure that holds Header objects. Duplicated
headers are merged into a single header. The data structure maintains
proper ordering of the headers.
headers = HeaderCollection.new
headers.add(Header.new("k", "v"))
headers.to_a # => [Header.new("k", "v")]
Constants
BLACKLIST_HEADERS = ["cache-control", "content-length", "expect", "max-forwards", "pragma", "te", "if-match", "if-none-match", "if-modified-since", "if-unmodified-since", "if-range", "accept", "authorization", "proxy-authorization", "from", "referer", "user-agent"]
List of headers names not allowed in the collection.
Instance methods
Adds a header to the collection. Merging duplicate header keys as per AWS requirements
add(header : Header) : HeaderCollection
Adds a Header to the internal header list If the header already exists, it's value is updated