Copyright | (c) Raghu Kaippully 2020 |
---|---|
License | MPL-2.0 |
Maintainer | rkaippully@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Traits related to HTTP headers.
Synopsis
- data Header (s :: Symbol) (t :: Type)
- data HeaderFail
- data HeaderMatch (s :: Symbol) (t :: Symbol)
- data HeaderMismatch = HeaderMismatch {}
Documentation
data Header (s :: Symbol) (t :: Type) Source #
A Trait
for capturing a header with name s
in a request or
response and convert it to some type t
via FromHttpApiData
.
data HeaderFail Source #
Failure in extracting a header value
Instances
Eq HeaderFail Source # | |
Defined in WebGear.Trait.Header (==) :: HeaderFail -> HeaderFail -> Bool # (/=) :: HeaderFail -> HeaderFail -> Bool # | |
Read HeaderFail Source # | |
Defined in WebGear.Trait.Header readsPrec :: Int -> ReadS HeaderFail # readList :: ReadS [HeaderFail] # readPrec :: ReadPrec HeaderFail # readListPrec :: ReadPrec [HeaderFail] # | |
Show HeaderFail Source # | |
Defined in WebGear.Trait.Header showsPrec :: Int -> HeaderFail -> ShowS # show :: HeaderFail -> String # showList :: [HeaderFail] -> ShowS # |
data HeaderMatch (s :: Symbol) (t :: Symbol) Source #
A Trait
for ensuring that a header named s
has value t
.
Instances
(KnownSymbol s, KnownSymbol t, Monad m) => Trait (HeaderMatch s t :: Type) Request m Source # | |
Defined in WebGear.Trait.Header type Val (HeaderMatch s t) Request Source # type Fail (HeaderMatch s t) Request Source # check :: Request -> m (CheckResult (HeaderMatch s t) Request) Source # | |
type Val (HeaderMatch s t :: Type) Request Source # | |
Defined in WebGear.Trait.Header | |
type Fail (HeaderMatch s t :: Type) Request Source # | |
Defined in WebGear.Trait.Header |
data HeaderMismatch Source #
Failure in extracting a header value
Instances
Eq HeaderMismatch Source # | |
Defined in WebGear.Trait.Header (==) :: HeaderMismatch -> HeaderMismatch -> Bool # (/=) :: HeaderMismatch -> HeaderMismatch -> Bool # | |
Read HeaderMismatch Source # | |
Defined in WebGear.Trait.Header readsPrec :: Int -> ReadS HeaderMismatch # readList :: ReadS [HeaderMismatch] # | |
Show HeaderMismatch Source # | |
Defined in WebGear.Trait.Header showsPrec :: Int -> HeaderMismatch -> ShowS # show :: HeaderMismatch -> String # showList :: [HeaderMismatch] -> ShowS # |