Options
All
  • Public
  • Public/Protected
  • All
Menu

An http response object.

export
class

Response

Hierarchy

  • Response

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Response(code?: number, body?: object): Response
  • Creates an instance of Response.

    memberof

    Response

    Parameters

    • Default value code: number = 200
    • Default value body: object = {}

    Returns Response

Properties

body

body: object

The body of the response.

type

{object}

memberof

Response

code

code: number

The status code of the response.

type

{number}

memberof

Response

headers

headers: object

The response headers.

type

{{ [name: string]: string }}

memberof

Response

Type declaration

  • [name: string]: string

Methods

toLambdaResponse

  • toLambdaResponse(): object
  • Returns an object suitable for a serverless response.

    memberof

    Response

    Returns object

    any

    • body: string
    • headers: object
      • [name: string]: string
    • statusCode: number

Generated using TypeDoc