dormouse-client-0.1.0.1: Simple, type-safe and testable HTTP client
Safe HaskellSafe-Inferred
LanguageHaskell2010

Dormouse.Client.Headers

Synopsis

Documentation

type HeaderName = CI ByteString Source #

The name of an HTTP Header. Header names are case insensitive.

class HasHeaders a where Source #

Describes something which has headers

Methods

getHeaders :: a -> Map HeaderName ByteString Source #

Retrieve all of the headers which a has.

getHeaderValue :: HeaderName -> a -> Maybe ByteString Source #

Try to retrieve a specific header from a with the supplied HeaderName

Instances

Instances details
HasHeaders (HttpResponse b) Source # 
Instance details

Defined in Dormouse.Client.Types

HasHeaders (HttpRequest url method body contentTag acceptTag) Source # 
Instance details

Defined in Dormouse.Client.Types

Methods

getHeaders :: HttpRequest url method body contentTag acceptTag -> Map HeaderName ByteString Source #

getHeaderValue :: HeaderName -> HttpRequest url method body contentTag acceptTag -> Maybe ByteString Source #