postgrest-8.0.0: REST API for any Postgres database
Safe HaskellNone
LanguageHaskell2010

PostgREST.Request.ApiRequest

Description

 
Synopsis

Documentation

data ApiRequest Source #

Describes what the user wants to do. This data type is a translation of the raw elements of an HTTP request into domain specific language. There is no guarantee that the intent is sensible, it is up to a later stage of processing to determine if it is an action we are able to perform.

Constructors

ApiRequest 

Fields

data InvokeMethod Source #

Constructors

InvHead 
InvGet 
InvPost 

Instances

Instances details
Eq InvokeMethod Source # 
Instance details

Defined in PostgREST.Request.ApiRequest

data ContentType Source #

Enumeration of currently supported response content types

Instances

Instances details
Eq ContentType Source # 
Instance details

Defined in PostgREST.ContentType

data Action Source #

Types of things a user wants to do to tablesviewsprocs

Instances

Instances details
Eq Action Source # 
Instance details

Defined in PostgREST.Request.ApiRequest

Methods

(==) :: Action -> Action -> Bool #

(/=) :: Action -> Action -> Bool #

data Target Source #

The target db object of a user action

data PayloadJSON Source #

Constructors

ProcessedJSON

Cached attributes of a JSON payload

Fields

  • pjRaw :: ByteString

    This is the raw ByteString that comes from the request body. We cache this instead of an Aeson Value because it was detected that for large payloads the encoding had high memory usage, see https://github.com/PostgREST/postgrest/pull/1005 for more details

  • pjKeys :: Set Text

    Keys of the object or if it's an array these keys are guaranteed to be the same across all its objects

RawJSON 

Fields

userApiRequest :: AppConfig -> DbStructure -> Request -> RequestBody -> Either ApiRequestError ApiRequest Source #

Examines HTTP request and translates it into user intent.