-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Urlencoded GET parameters #848
Comments
Hi there. Consider this Lambda function (no Zappa): from __future__ import print_function
import json
print('Loading function')
def respond(err, res=None):
return {
'statusCode': '400' if err else '200',
'body': err.message if err else json.dumps(res),
'headers': {
'Content-Type': 'application/json',
},
}
def lambda_handler(event, context):
print("Received event: " + json.dumps(event, indent=2))
return respond(None, event) Wired this up to apigw and hit it with curl:
The relevant output is: "queryStringParameters": {
"filterreceipt": "1"
}, Unfortunately, I don't believe there's anything we can do to fix this in Zappa. @Miserlou: I suggest close. |
Addendum: please ask AWS support to request a fix from the apigw team. If enough of us do this, it might work. |
You are not right. I fixed it when I work with API Gateway directly. I encode querystring with base64 in API Gateway templates mapping and decode when params received in lambda event. It works for me and i think no reason not to work for you |
Can you elaborate? How? |
This is part of my AG template
|
Hi. I finally had a chance to look into this today. Are you sure that Apache Velocity template turns I couldn't get it to work directly with apigw+lambda with this template (there's a syntax error at the start of your example, but I think that's just missing a |
Update: even a straight-up Very interested in how you accomplished this, if it works for you. (-: |
Going to close this one. Please reopen if there is new information. |
Related: the |
I have used Dynamic Rest library with additional filtering. If I use standard filter expression like as '/api/receipt-image/?filter{receipt}=1' I get empty response. It is properly works with '/api/receipt-image/?filter%7Breceipt%7D=1'. I think it concerned event's parsing.
The text was updated successfully, but these errors were encountered: