Options
All
  • Public
  • Public/Protected
  • All
Menu

The base endpoint class implemented by all endpoints.

export
class

Endpoint

Hierarchy

  • Endpoint

Index

Properties

after

after: any[] = []

An array of references to processResponse handlers.

type

{any[]}

memberof

Endpoint

before

before: any[] = []

An array of references to processRequest handlers.

type

{any[]}

memberof

Endpoint

middleware

middleware: Middleware[] = []

An array of middleware objects.

type

{Middleware[]}

memberof

Endpoint

Methods

delete

  • Base implementation of DELETE.

    throws

    {MethodNotAllowed}

    memberof

    Endpoint

    Parameters

    Returns Promise<any>

get

  • Base implementation of GET.

    throws

    {MethodNotAllowed}

    memberof

    Endpoint

    Parameters

    Returns Promise<any>

handler

  • handler(): (Anonymous function)
  • The base handler registered with serverless. Returns an async function that handles standard serverless handler arguments. The returned function mounts all middleware and a verb-based handler function based on the request method. Middleware request processors are called first, then the verb-based handler, then middleware response processors. If an error is thrown, it is converted to a response object and sent.

    throws

    {HTTPError}

    memberof

    Endpoint

    Returns (Anonymous function)

    async (evt: APIGatewayEvent, ctx: Context, cb: Callback)

post

  • Base implementation of POST.

    throws

    {MethodNotAllowed}

    memberof

    Endpoint

    Parameters

    Returns Promise<any>

put

  • Base implementation of PUT.

    throws

    {MethodNotAllowed}

    memberof

    Endpoint

    Parameters

    Returns Promise<any>

register

  • Adds a middleware object to the stack.

    memberof

    Endpoint

    Parameters

    Returns void

Generated using TypeDoc