Add multiValueHeaders to ProxyResult too

This commit is contained in:
Trevor Leach
2018-10-27 14:52:49 -07:00
parent c54151e2e2
commit 5395cd9693
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -250,6 +250,9 @@ num = proxyResult.statusCode;
proxyResult.headers!["example"] = str;
proxyResult.headers!["example"] = bool;
proxyResult.headers!["example"] = num;
proxyResult.multiValueHeaders!["example"][0] = str;
proxyResult.multiValueHeaders!["example"][0] = bool;
proxyResult.multiValueHeaders!["example"][0] = num;
boolOrUndefined = proxyResult.isBase64Encoded;
str = proxyResult.body;
+4 -1
View File
@@ -60,7 +60,7 @@ export interface APIGatewayEventRequestContext {
export interface APIGatewayProxyEvent {
body: string | null;
headers: { [name: string]: string };
multiValueHeaders: { [name: string]: string };
multiValueHeaders: { [name: string]: string[] };
httpMethod: string;
isBase64Encoded: boolean;
path: string;
@@ -447,6 +447,9 @@ export interface APIGatewayProxyResult {
headers?: {
[header: string]: boolean | number | string;
};
multiValueHeaders?: {
[header: string]: Array<boolean | number | string>;
};
body: string;
isBase64Encoded?: boolean;
}