module

Amazonite::Core::HeaderValue

Scalar (de)serialization helpers for the http-bound members of a rest protocol's request/response - a header carries plain text, so every non-String member type needs a text conversion, and unlike a body value the timestamp format depends on the binding rather than the protocol (Smithy defaults an httpHeader timestamp to http-date and an httpQuery or httpLabel one to date-time, either overridable per shape).

Class methods

bool(value : String | Nil) : Bool | Nil
Source
date_time(value : String | Nil) : Time | Nil
Source
epoch(value : String | Nil) : Time | Nil
Source
format_date_time(value : Time) : String
Source
format_epoch(value : Time) : String
Source
format_http_time(value : Time) : String
Source
http_time(value : String | Nil) : Time | Nil
Source
i32(value : String | Nil) : Int32 | Nil
Source
i64(value : String | Nil) : Int64 | Nil
Source
list(value : String | Nil) : Array(String) | Nil

A list-typed header is one header holding comma-separated values, not one header per element, so it splits rather than being read repeatedly.

Source
prefixed(headers : HTTP::Headers, prefix : String) : Hash(String, String)

Every header whose name starts with prefix (smithy.api#httpPrefixHeaders, e.g. S3's "x-amz-meta-" user metadata), keyed by the remainder of the name. Header names are case-insensitive on the wire, so the prefix is matched that way too, and the key keeps the casing the service sent.

Source