webgear-server-1.0.1: Composable, type-safe library to build HTTP API servers
Safe HaskellNone
LanguageHaskell2010

WebGear.Server.Trait.Body

Description

Server implementation of the Body trait.

Orphan instances

(MonadIO m, FromJSON val) => Get (ServerHandler m) (JSONBody val) Request Source # 
Instance details

Methods

getTrait :: forall (ts :: [Type]). JSONBody val -> ServerHandler m (Linked ts Request) (Either (Absence (JSONBody val) Request) (Attribute (JSONBody val) Request)) #

(MonadIO m, FromByteString val) => Get (ServerHandler m) (Body val) Request Source # 
Instance details

Methods

getTrait :: forall (ts :: [Type]). Body val -> ServerHandler m (Linked ts Request) (Either (Absence (Body val) Request) (Attribute (Body val) Request)) #

(Monad m, ToJSON val) => Set (ServerHandler m) (JSONBody val) Response Source # 
Instance details

Methods

setTrait :: forall (ts :: [Type]). JSONBody val -> (Linked ts Response -> Response -> Attribute (JSONBody val) Response -> Linked (JSONBody val ': ts) Response) -> ServerHandler m (Linked ts Response, Attribute (JSONBody val) Response) (Linked (JSONBody val ': ts) Response) #

(Monad m, ToByteString val) => Set (ServerHandler m) (Body val) Response Source # 
Instance details

Methods

setTrait :: forall (ts :: [Type]). Body val -> (Linked ts Response -> Response -> Attribute (Body val) Response -> Linked (Body val ': ts) Response) -> ServerHandler m (Linked ts Response, Attribute (Body val) Response) (Linked (Body val ': ts) Response) #