Module
Peregrine.Http.Headers.HeaderName
- Package
- purescript-peregrine
- Repository
- maxdeviant/peregrine
#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
#fromString Source
fromString :: String -> Maybe HeaderName