apiary-0.11.0: Simple web framework inspired by scotty.

Safe HaskellNone

Data.Apiary.Param

Documentation

jsToBool :: (IsString a, Eq a) => a -> BoolSource

readPathAs :: Path a => proxy a -> Text -> Maybe aSource

class Path a whereSource

Methods

readPath :: Text -> Maybe aSource

Instances

Path Bool

javascript boolean. when "false", "0", "-0", "", "null", "undefined", "NaN" then False, else True. since 0.6.0.0.

Path Char 
Path Double 
Path Float 
Path Int 
Path Int8 
Path Int16 
Path Int32 
Path Int64 
Path Integer 
Path Word 
Path Word8 
Path Word16 
Path Word32 
Path Word64 
Path String 
Path ByteString 
Path ByteString 
Path Text 
Path Text 

class Query a whereSource

Instances

Query Bool

javascript boolean. when "false", "0", "-0", "", "null", "undefined", "NaN" then False, else True. since 0.6.0.0.

Query Double 
Query Float 
Query Int 
Query Int8 
Query Int16 
Query Int32 
Query Int64 
Query Integer 
Query Word 
Query Word8 
Query Word16 
Query Word32 
Query Word64 
Query String 
Query ()

always success. for exists check.

Query ByteString 
Query ByteString 
Query Text 
Query Text 
Query a => Query (Maybe a)

allow no parameter. but check parameter type.

class ReqParam a whereSource

Methods

reqParams :: Proxy a -> Request -> [Param] -> [File ByteString] -> [(ByteString, Maybe a)]Source