Skip to content

"error": "Method not allowed" #182

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

Closed
raja-vcomply opened this issue May 29, 2021 · 4 comments
Closed

"error": "Method not allowed" #182

raja-vcomply opened this issue May 29, 2021 · 4 comments

Comments

@raja-vcomply
Copy link

When i am hitting the route its returning "method not allowed"

@raja-vcomply
Copy link
Author

@jthomerson @jeremydaly help me pls

@jeremydaly
Copy link
Owner

Hey @raja-vcomply!

Can you post some sample code?

@codyfyi
Copy link
Contributor

codyfyi commented Jun 9, 2021

@raja-vcomply - I just ran into this too. I was using API Gateway V2, but it appears lambda-api won't support the v2.0 event payload format until 0.11 per this comment:

v0.11 supports Payload V2 and should be available shortly.

Originally posted by @jeremydaly in #174 (comment)

If this sounds like your case, you can force the API Gateway V2 to use the v1.0 payload format in the settings. I also noticed the new $default route did not work with lambda-api, and had to configure / and /{proxy+} routes instead.

@mattwen-amzn
Copy link

If I understand the situation correctly @codyfyi, I believe it does support v2.0 events. Your code should be this.

const app = api.default({version: 'v2.0'});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants