Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove method from Request Event #21

Merged
merged 2 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading