Module
HTTPurple.Json
- Package
- purescript-httpurple
- Repository
- sigma-andex/purescript-httpurple
#JsonDecoder Source
newtype JsonDecoder err json
Constructors
JsonDecoder (String -> Either err json)
Instances
Newtype (JsonDecoder err json) (String -> Either err json)
#JsonEncoder Source
newtype JsonEncoder json
Constructors
JsonEncoder (json -> String)
Instances
Newtype (JsonEncoder json) (json -> String)
#fromJson Source
fromJson :: forall (err :: Type) (json :: Type) (m :: Type -> Type). MonadAff m => JsonDecoder err json -> RequestBody -> ContT Response m json
Parse the RequestBody
as json using the provided JsonDecoder
.
If it fails, an empty bad request is returned
Returns a continuation
- Modules
- HTTPurple
- HTTPurple.
Body - HTTPurple.
Cont - HTTPurple.
Headers - HTTPurple.
Json - HTTPurple.
Lookup - HTTPurple.
Method - HTTPurple.
Middleware - HTTPurple.
NodeMiddleware - HTTPurple.
Path - HTTPurple.
Query - HTTPurple.
Request - HTTPurple.
Response - HTTPurple.
Routes - HTTPurple.
Server - HTTPurple.
Status - HTTPurple.
Utils - HTTPurple.
Validation - HTTPurple.
Version