Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Add support for retrieving HTTP payload 2.0 method and path info #58

Closed
wants to merge 2 commits into from

Conversation

c3ko
Copy link

@c3ko c3ko commented Aug 19, 2020

The new format for HTTP payload (v2.0), nests the fields for the request method and path inside the requestContext.http field causing the lambda instance to fail with KeyErrors when accessing the httpMethod/path fields in event.

@c3ko c3ko marked this pull request as ready for review August 19, 2020 04:13
@tudormunteanu
Copy link

Is there anything blocking this merge?

@to-s
Copy link

to-s commented Sep 21, 2023

Thanks, working as expected with the direct function URL of the lambda function.

import awsgi
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"

def lambda_handler(event, context):
    print(event)
    return awsgi.response(app, event, context)

@jonathandavis805
Copy link

can we get this merged?

@slank slank closed this Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants