Module

HTTPure.Headers

Package
purescript-httpure
Repository
cprussin/purescript-httpure

#Headers Source

newtype Headers

The Headers type is just sugar for a StrMap of Strings that represents the set of headers sent or received in an HTTP request or response.

Instances

  • Lookup Headers String String

    Given a string, return the matching headers. This search is case-insensitive.

  • Show Headers

    Allow a headers set to be represented as a string.

  • Eq Headers

    Compare two Headers objects by comparing the underlying StrMaps.

#read Source

read :: Request -> Headers

Get the headers out of a HTTP Request object.

#write Source

write :: forall e. Response -> Headers -> Eff (http :: HTTP | e) Unit

Given an HTTP Response and a Headers object, return an effect that will write the Headers to the Response.

#headers Source

headers :: Array (Tuple String String) -> Headers

Convert an Array of Tuples of 2 Strings to a Headers object.