Module
Peregrine.Http.Headers
- Package
- purescript-peregrine
- Repository
- maxdeviant/peregrine
#singleton Source
singleton :: HeaderName -> HeaderValue -> Headers
#insert Source
insert :: HeaderName -> HeaderValue -> Headers -> Headers
#lookup Source
lookup :: HeaderName -> Headers -> Maybe HeaderValue
#HeaderValue Source
type HeaderValue = String
Re-exports from Peregrine.Http.Headers.HeaderName
#HeaderName Source
#MakeHeaderName Source
class MakeHeaderName :: Symbol -> Constraint
class MakeHeaderName (s :: Symbol) where
A helper class for defining header names at compile time.
contentType :: HeaderName
contentType = staticHeaderName (Proxy :: Proxy "Content-Type")
Members
staticHeaderName :: forall proxy. proxy s -> HeaderName
Instances
(Fail (Text "Header name must be a non-empty string.")) => MakeHeaderName ""
(IsSymbol s) => MakeHeaderName s