Stability | experimental |
---|---|
Maintainer | Alp Mestanogullari <alp@zalora.com> |
Safe Haskell | None |
- module Servant.Response
- respond :: (Response resp x, ScottyError e, Monad m) => x -> ActionT e m ()
The Response
class
module Servant.Response
respond
respond :: (Response resp x, ScottyError e, Monad m) => x -> ActionT e m ()Source
Given the result of some operation,
it picks the appropriate response type
and uses toResponse
to convert the result
to a JSON-encodable value along with a status code,
both used to then send a response to the client.