dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.72k stars 166 forks source link

feat: support SCF apigateway event structure #133

Closed Juliiii closed 1 year ago

Juliiii commented 4 years ago

Hello, here is why i make this pr.

I try to use koa in TencentCloud Serverless Cloud Functions with serverless-http. Everything seems ok. But i found a case that if i create a apigateway trigger in their console, they will not configure query params in the TencentCloud Apigateway. So when i create a function which returns ctx.query, and request the apigateway path like curl https://service-818xjkw2-1252618971.gz.apigw.tencentcs.com/release/blog_visit?a=1&b=2

i can not get the query params in queryStringParameters, but in queryString and the docs of them also says this case. Link image

So I make a little change to adapt to this case and add a test:

image

Please take some time to review and merge it🌹!

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Juliiii commented 1 year ago

你好!我已经收到你的邮件,我会尽快回复你的~

Juliiii commented 1 year ago

你好!我已经收到你的邮件,我会尽快回复你的~