Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

anyBody

anyBody: any = require('body/any')

formBody

formBody: any = require('body/form')

jsonBody

jsonBody: any = require('body/json')

textBody

textBody: any = require('body')

Functions

capture

parseRequestBody

  • parseRequestBody(contentType: string | undefined, req: ERCIRequest, res: ERCIResponse, options: any): Promise<string | object>
  • Parameters

    Returns Promise<string | object>

    Promise< string | { [key: number|string]: any }> the parsed body

parseRequestMeta

  • parseRequestMeta(req: Request): object
  • dependancy:

    called after parseResponseBody

    Parameters

    • req: Request

    Returns object

    , host: string, clientIp: string }

    • clientIp: string | string[]
    • headers: object
      • [key: string]: any
    • host: undefined | string
    • method: string

parseResponseBody

  • parseResponseBody(res: ERCIResponse, options: any, next: function): Promise<string | object>
  • dependancy:

    called after parseRequestBody

    Parameters

    • res: ERCIResponse

      Express.Response

    • options: any
    • next: function
        • (): any
        • Returns any

    Returns Promise<string | object>

    Promise the parsed body

parseResponseMeta

  • dependancy:

    called after parseResponseBody

    Parameters

    Returns object

    }

    • headers: any
    • status: number

parseUrl

  • parseUrl(req: Request): string
  • dependancy:

    called after parseResponseBody

    Parameters

    • req: Request

    Returns string

    Promise< string | { [key: number|string]: any }> the parsed body

Object literals

ContentTypes

ContentTypes: object

APPLICATION_FORM

APPLICATION_FORM: string = "application/x-www-form-urlencoded"

APPLICATION_JSON

APPLICATION_JSON: string = "application/json"

TEXT_PLAIN

TEXT_PLAIN: string = "text/plain"

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc