Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace RouterResponse

An HTTP response that will be processed into a proper AWS API Gateway ProxyResponse by the Router.

Index

Properties

body

body: any

The body of the response, which will be stringified unless headers["Content-Type"] is specified and not "application/json" and the body is already a string.

Optional cookies

cookies: {}

Optional cookies to set on the response.

Type declaration

Optional headers

headers: {}

Optional headers to set on the response.

Type declaration

  • [key: string]: string

Optional multiValueHeaders

multiValueHeaders: {}

Optional headers to set on the response but allowing multiple values.

Type declaration

  • [header: string]: string[]

Optional statusCode

statusCode: number

The HTTP status code to respond with. Defaults to 200.

Functions

getHeader

  • getHeader(resp: RouterResponse, field: string): string | string[] | null

setHeader

setMultiValueHeader

  • setMultiValueHeader(resp: RouterResponse, field: string, value: string[]): void

Generated using TypeDoc