Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- module Web.Minion.Response
- newtype RespBody cts a = RespBody a
- class EncodeBody cts a where
- encodeBody :: ByteString -> a -> Response
- class Encode ct a where
- handleBody :: forall cts o m ts i st. HandleArgs ts st m => IsResponse m (RespBody cts o) => Introspection i Response (RespBody cts o) => Method -> (DelayedArgs st ~> m o) -> Router' i ts m
Documentation
module Web.Minion.Response
newtype RespBody cts a Source #
RespBody a |
Instances
AllContentTypes cts => CanRespond (RespBody cts a :: Type) Source # | |
Defined in Web.Minion.Response.Body canRespond :: [ByteString] -> Bool Source # | |
(EncodeBody (ct ': cts) a2, Encode ct a2, MonadIO m, ContentType ct) => ToResponse m (RespBody (ct ': cts) a2) Source # | |
Defined in Web.Minion.Response.Body toResponse :: [ByteString] -> RespBody (ct ': cts) a2 -> m Response Source # | |
MonadIO m => ToResponse m (RespBody ('[] :: [k]) a) Source # | |
Defined in Web.Minion.Response.Body toResponse :: [ByteString] -> RespBody '[] a -> m Response Source # |
class EncodeBody cts a where Source #
encodeBody :: ByteString -> a -> Response Source #
Instances
EncodeBody ('[] :: [k]) a Source # | |
Defined in Web.Minion.Response.Body encodeBody :: ByteString -> a -> Response Source # | |
(ContentType ct, Encode ct a2, EncodeBody cts a2) => EncodeBody (ct ': cts :: [a1]) a2 Source # | |
Defined in Web.Minion.Response.Body encodeBody :: ByteString -> a2 -> Response Source # |
:: forall cts o m ts i st. HandleArgs ts st m | |
=> IsResponse m (RespBody cts o) | |
=> Introspection i Response (RespBody cts o) | |
=> Method | . |
-> (DelayedArgs st ~> m o) | |
-> Router' i ts m |
Handles request with specified HTTP method and responds with specified Content-Type
.../>
handleBody
GET @'[PlainText] @MyResponse someEndpoint