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