Function buildResponse

  • build http response body

    • if body is string type, then content-type would be text/.
    • or default type is json

    Returns

    http response body

    Parameters

    • statusCode: number

      http response code like 200

    • body: any

      string or object

    • Optional contentType: string

      (optional) the target content-type

    • Optional origin: string

      (optional) the allow origin (default *)

    Returns APIGatewayProxyResult

Generated using TypeDoc