firefly-0.1.0.1: A simple HTTP server framework

Safe HaskellNone
LanguageHaskell2010

Web.Firefly.Response

Synopsis

Documentation

class ToResponse c where Source #

This class represents all types which can be converted into a valid Response. Feel free to implement additional instances for your own data-types.

Minimal complete definition

toResponse

Methods

toResponse :: c -> Response Source #

newtype Json a Source #

A simple newtype wrapper you can use to wrap values, signifying they should be JSON encoded sent with the "application/json" Content-Type.

Constructors

Json a 

Instances

Show a => Show (Json a) Source # 

Methods

showsPrec :: Int -> Json a -> ShowS #

show :: Json a -> String #

showList :: [Json a] -> ShowS #

ToJSON a => ToResponse (Json a) Source # 

respond :: ToResponse r => r -> App () Source #

Respond to the client immediately. Any statements following this one in the App or Handler Monads will not be run.