Module

Payload.Client.Queryable

Package
purescript-payload
Repository
hoodunit/purescript-payload

#ClientFnWithOptions Source

type ClientFnWithOptions payload body = RequestOptions -> ClientFn payload body

#ClientFn Source

type ClientFn payload body = payload -> Aff (ClientResponse body)

#Queryable Source

class Queryable route (basePath :: Symbol) (baseParams :: Row Type) payload res | route baseParams basePath -> payload, route -> res where

Members

Instances

#Request Source

type Request = { body :: Maybe RequestBody, headers :: Array RequestHeader, method :: Method, opts :: Options, reqOpts :: RequestOptions, url :: String }

#makeRequest Source

makeRequest :: forall body. DecodeResponse body => Request -> Aff (ClientResponse body)

#decodeAffjaxResponse Source

#bodyResponse Source

bodyResponse :: forall a. Response String -> a -> Response a

#statusAndHeaders Source

statusAndHeaders :: forall a. Response a -> { headers :: Headers, status :: HttpStatus }

#EncodeOptionalBody Source

class EncodeOptionalBody (body :: Type) (payload :: Row Type)  where

Members

Instances

#EncodeOptionalQuery Source

class EncodeOptionalQuery (url :: Symbol) (query :: Type) (payload :: Row Type)  where

Members

Instances

#EncodeUrlWithParams Source

class EncodeUrlWithParams (url :: Symbol) (params :: RowList Type) (payload :: Row Type)  where

Members

Instances

#encodeUrl Source

encodeUrl :: forall url params. EncodeUrl url params => Options -> Proxy url -> Record params -> String

#stripTrailingSlash Source

#appendHeaders Source

appendHeaders :: forall a. Headers -> Request a -> Request a