serverless-wsgi
serverless-wsgi copied to clipboard
Flask app list - gets always one element only
I have GET endpoint in Flask app that gets list of elements - but only one element is received.
example -
GET http://my-lambda.aws.com/my-endpoint?name=john&ids[]=8e7afb33&ids[]=6602f075
parsed request body -
{
"name": "john",
"ids": ["8e7afb33"]
}
when printing Flask request.query_string
- name=john&ids[]=8e7afb33
is printed.
I am using AWS Lambda behind an ALB with Flask (ALB logs indicates that request received as expected).
Thanks
is there a workaround for this?
I had a different issue, where I was getting the item as a string but comma separated something like this might help
def handler(event, context):
event['queryStringParameters']['ids[]'] = event['queryStringParameters']['ids[]'].split(',')
....
This should have been fixed by #87. Just tested and the example worked fine for both v1 and v2 APIGW requests. Please reopen if the problem persists.