-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A quick webapp generator for any file processing tool
--
@package quickwebapp
@version 2.1.1.0
-- | A quick-and-dirty api generator, for any function `a -> b` which
-- can be wrapped inside a function `ByteString -> ByteString`. It is
-- inspired from the interact function from Prelude.
module QuickWebApp
-- | Represents types which can be converted to a Lazy ByteString
class ToLBS a
toLBS :: ToLBS a => a -> ByteString
-- | Represents types which can be converted from a Lazy
-- ByteString This is intended for other String-like types
class FromLBS a
fromLBS :: FromLBS a => ByteString -> a
-- | Unprocessable entity error code (temporary fix for a missing status in
-- http-types)
err422 :: Status
-- | Equivalent to 'interactWebOn 3000'
interactWeb :: (FromLBS a, ToLBS b) => (a -> b) -> IO ()
-- | Equivalent to 'interactWebEitherOn 3000'
interactWebEither :: (FromLBS a, ToLBS b, ToLBS e) => (a -> Either e b) -> IO ()
-- | Create an API with a POST endpoint
interactWebOn :: (FromLBS a, ToLBS b) => Int -> (a -> b) -> IO ()
-- | Create an API with a POST endpoint If the function fails and
-- returns a Left value, return a 422 response with the error in
-- the body
interactWebEitherOn :: (FromLBS a, ToLBS b, ToLBS e) => Int -> (a -> Either e b) -> IO ()
instance FromLBS String
instance FromLBS Text
instance FromLBS Text
instance FromLBS ByteString
instance FromLBS ByteString
instance ToLBS String
instance ToLBS Text
instance ToLBS Text
instance ToLBS ByteString
instance ToLBS ByteString