Skip to content

Commit

Permalink
Add multiValueHeaders to ProxyResult too
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-leach committed Oct 31, 2018
1 parent c54151e commit 9fe08c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions types/aws-lambda/aws-lambda-tests.ts
Expand Up @@ -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;

Expand Down
5 changes: 4 additions & 1 deletion types/aws-lambda/index.d.ts
Expand Up @@ -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;
Expand Down Expand Up @@ -447,6 +447,9 @@ export interface APIGatewayProxyResult {
headers?: {
[header: string]: boolean | number | string;
};
multiValueHeaders?: {
[header: string]: Array<boolean | number | string>;
};
body: string;
isBase64Encoded?: boolean;
}
Expand Down

0 comments on commit 9fe08c1

Please sign in to comment.