Skip to content

Commit

Permalink
Remove method from Request Event (#21)
Browse files Browse the repository at this point in the history
* Remove method from Request Event

* Don't change package.json version
  • Loading branch information
alavarello committed Oct 28, 2023
1 parent 9d5f0eb commit 591b8cc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-lambda-local-dev",
"version": "2.1.0",
"version": "2.0.0",
"description": "typescript lambda local development server",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion src/local.lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export class LocalLambda {
const req: RequestEvent = {
path: parsedUrl.pathname!,
httpMethod: request.method as HTTPMethod,
method: request.method,
headers: request.headers,
/* if duplicate queryParameters are present then API Gateway will flatten them into a comma-separated list
eg: ?a=1&a=2&a=3 will be parsed as { a: [1,2,3] } by url.parse and flattenArraysInJSON will convert it to { a: '1,2,3' } which is the same behavior as API Gateway
Expand Down
1 change: 0 additions & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { HTTPMethod } from 'http-method-enum';
export interface RequestEvent {
requestContext?: any;
httpMethod?: HTTPMethod;
method?: string;
path: string;
headers?: IncomingHttpHeaders;
multiValueHeaders?: { [name: string]: string[] };
Expand Down

0 comments on commit 591b8cc

Please sign in to comment.