servant-0.16.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 :: [*]) (contentTypes :: [*]) (a :: *)

# 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

Instances details

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