Servant.API.ReqBody

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

Safe Haskell | None
Language | Haskell2010

Servant.API.ReqBody

Synopsis

- type ReqBody = ReqBody' '[Required, Strict]
- data ReqBody' (mods :: [Type]) (contentTypes :: [Type]) a

# Documentation

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

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 :: [Type]) (contentTypes :: [Type]) a #

Note: `ReqBody'` is always `Required`.

#### Instances

Instances details

HasLink sub => HasLink (ReqBody' mods ct a :> sub :: Type) # |
Instance details Defined in Servant.Links Methods toLink :: (Link -> a0) -> Proxy (ReqBody' mods ct a :> sub) -> Link -> MkLink (ReqBody' mods ct a :> sub) a0 #
type MkLink (ReqBody' mods ct a :> sub :: Type) r # |
Instance details Defined in Servant.Links type MkLink (ReqBody' mods ct a :> sub :: Type) r = MkLink sub r