wai-middleware-content-type-0.0.3.3: Route to different middlewares based on the incoming Accept header.

Safe HaskellNone
LanguageHaskell2010

Network.Wai.Middleware.ContentType.Json

Synopsis

Documentation

json :: (ToJSON j, MonadIO m) => j -> FileExtListenerT (MiddlewareT m) m () Source

Uses Json as the key in the map, and "application/json" as the content type.

jsonp :: (ToJSON j, MonadIO m) => j -> FileExtListenerT (MiddlewareT m) m () Source

Uses Json as the key in the map, and "application/javascript" as the content type.