Module
HTTPure.Headers
- Package
- purescript-httpure
- Repository
- citizennet/purescript-httpure
#Headers Source
newtype HeadersThe Headers type is just sugar for a Object of Strings
that represents the set of headers in an HTTP request or response.
Constructors
Instances
#read Source
read :: Request -> HeadersGet the headers out of a HTTP Request object.
We intentionally filter out "Set-Cookie" headers here as according to the
node.js docs, the "set-cookie" header is always represented as an array,
and trying to read it as String would cause a runtime type error.
See https://nodejs.org/api/http.html#messageheaders.
Given a string, return a
Maybecontaining the value of the matching header, if there is any.