HTTPure.MultiHeaders
- Package
- purescript-httpure
- Repository
- citizennet/purescript-httpure
#MultiHeaders Source
newtype MultiHeadersThe MultiHeaders type represets the set of headers in a HTTP request or
response read in a way such that every header name maps to a non-empty list
of header values. This is useful for headers that may have multiple values,
such as "Set-Cookie".
Constructors
Instances
Newtype MultiHeaders _Generic MultiHeaders _Lookup MultiHeaders String (NonEmptyArray String)Show MultiHeadersEq MultiHeadersCompare two
MultiHeadersobjects by comparing the underlyingObjects.Semigroup MultiHeadersAllow one
MultiHeadersobjects to be appended to another.Monoid MultiHeaders
#empty Source
empty :: MultiHeadersReturn a MultiHeaders containing nothing.
#fromHeaders Source
fromHeaders :: Headers -> MultiHeadersCreate a MultiHeaders out of a Headers value.
#header Source
header :: String -> String -> MultiHeadersCreate a singleton header from a key-value pair.
#header' Source
header' :: String -> NonEmptyArray String -> MultiHeadersCreate a singleton header from a key-values pair.
#headers' Source
headers' :: Array (Tuple String (NonEmptyArray String)) -> MultiHeadersConvert an Array of Tuples of 2 Strings to a MultiHeaders object.
#read Source
read :: Request -> MultiHeadersRead the headers out of a HTTP Request object and parse duplicated
headers as a list (instead of comma-separated values, as with
HTTPure.Headers.read).
#toString Source
toString :: MultiHeaders -> StringAllow a MultiHeaders to be represented as a string. This string is
formatted in HTTP headers format.
Given a string, return a
Maybecontaining the values of the matching header, if there is any.