-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProxyResponse.ts
37 lines (32 loc) · 1.13 KB
/
ProxyResponse.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* API Gateway proxy response object.
* see: http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html#api-gateway-simple-proxy-for-lambda-output-format
*/
export interface ProxyResponse {
/**
* The HTTP status code to respond with.
*/
statusCode: number;
/**
* Headers to set on the response.
*/
headers: { [key: string]: string };
/**
* Headers to set on the response. Can contain multi-value headers
* as well as single-value headers.
*
* If you specify values for both headers and multiValueHeaders, API Gateway
* merges them into a single list. If the same key-value pair is specified in
* both, only the values from multiValueHeaders will appear in the merged list.
*/
multiValueHeaders: { [header: string]: string[] };
/**
* The string representation of the JSON to respond with.
*/
body: string;
/**
* For binary support set this to `true` and base64 encode the body.
*/
isBase64Encoded?: boolean;
}
export type ProxyResponseCallback = (error?: Error, result?: ProxyResponse) => void;