servant-0.14: A family of combinators for defining webservices APIs

Safe HaskellNone
LanguageHaskell2010

Servant.API.ReqBody

Synopsis

Documentation

type ReqBody = ReqBody' '[Required, Strict] Source #

Extract the request body as a value of type a.

Example:

>>> -- POST /books
>>> type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book

data ReqBody' (mods :: [*]) (contentTypes :: [*]) (a :: *) Source #

Note: ReqBody' is always Required.

Instances

HasLink * sub => HasLink * ((:>) * (ReqBody' mods ct a) sub) Source # 

Associated Types

type MkLink ((* :> ReqBody' mods ct a) sub) (endpoint :: (* :> ReqBody' mods ct a) sub) a :: * Source #

Methods

toLink :: (Link -> a) -> Proxy ((* :> ReqBody' mods ct a) sub) endpoint -> Link -> MkLink ((* :> ReqBody' mods ct a) sub) endpoint a Source #

type MkLink * ((:>) * (ReqBody' mods ct a) sub) r Source # 
type MkLink * ((:>) * (ReqBody' mods ct a) sub) r = MkLink * sub r