awsgi icon indicating copy to clipboard operation
awsgi copied to clipboard

Add support for retrieving HTTP payload 2.0 method and path info

Open c3ko opened this issue 5 years ago • 1 comments

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 avatar Aug 19 '20 04:08 c3ko

Is there anything blocking this merge?

tudormunteanu avatar Dec 20 '21 12:12 tudormunteanu

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)

to-s avatar Sep 21 '23 11:09 to-s

can we get this merged?

jonathandavis805 avatar Mar 01 '24 15:03 jonathandavis805