Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
data Header (sym :: Symbol) a Source #
Extract the given header's value as a value of type a
.
Example:
>>>
newtype Referer = Referer Text deriving (Eq, Show)
>>>
>>>
-- GET /view-my-referer
>>>
type MyApi = "view-my-referer" :> Header "from" Referer :> Get '[JSON] Referer
(KnownSymbol h, ToHttpApiData v) => AddHeader h v (Headers ((:) * fst rest) a) (Headers ((:) * (Header h v) ((:) * fst rest)) a) Source # | |
Functor (Header sym) Source # | |
(KnownSymbol h, ToHttpApiData x, GetHeaders (HList xs)) => GetHeaders (HList ((:) * (Header h x) xs)) Source # | |
HasLink k sub => HasLink * ((:>) * k (Header sym a) sub) Source # | |
Eq a => Eq (Header sym a) Source # | |
Show a => Show (Header sym a) Source # | |
(KnownSymbol h, GetHeaders (HList rest), ToHttpApiData v) => GetHeaders (Headers ((:) * (Header h v) rest) a) Source # | |
(FromHttpApiData v, BuildHeadersTo xs, KnownSymbol h) => BuildHeadersTo ((:) * (Header h v) xs) Source # | |
type MkLink * ((:>) * k (Header sym a) sub) Source # | |