Module

Payload.ResponseTypes

Package
purescript-payload
Repository
hoodunit/purescript-payload

#Response Source

newtype Response r

The type of a server response, before encoding the body. Responses with modified statuses or headers can be created by returning this type (directly or via helper functions).

Constructors

Instances

#ResponseContent Source

type ResponseContent r = { body :: r, headers :: Headers, status :: HttpStatus }

#HttpStatus Source

type HttpStatus = { code :: Int, reason :: String }

#Empty Source

data Empty

An empty response body

Constructors

#Json Source

newtype Json a

A JSON response body

Constructors

#Failure Source

data Failure

All server error responses ultimately resolve into this type

Constructors

Instances

#RawResponse Source

type RawResponse = Response ResponseBody

All server responses ultimately resolve into this type.

#ResponseBody Source

data ResponseBody

The base types of body responses that can be returned.

Constructors

Instances

#UnsafeStream Source

#Result Source

type Result a = ExceptT Failure Aff a

Internally handlers and guards all de-sugar into this type.