Hello, I’m an deploying an Http4k Rest API to an A...
# http4k
p
Hello, I’m an deploying an Http4k Rest API to an AWS Lambda function, using ApiGatewayRestLambdaFunction. I just realised that I’m not being able to use multi value query parameters on my api. If I make a request with something like
/api?p1=1&p1=2
, my Http4k handler receives only the last value:
/api?p1=2
I know that the API Gateway now supports multi value parameters, so I’m guessing the http4k adapter is not picking those values from the Lambda event. Is this correct? And if so, is there anything I can do to overcome this?
s
Looking at the aws docs I can tell we’re not pulling the multi-value query parameters. So, your assumption is correct. We can extend it to support that in the next few days, or let us know if you want to contribute with a PR. The only workaround at the moment would be copying that adapter class and modifying it, anyway.
p
Hi @s4nchez , thank you so much for your quick response! 🙂 I’ll copy and modify the adapter for now. I can try to create a PR later, but I don’t know if I’ll have the time for that
👍 1
a
I've made a Github issue for posterity. If it doesn't get added soon, I might have some time to do it this weekend. https://github.com/http4k/http4k/issues/986
s
I've added that (see PR) and it'll be available in 5.8.4.0 (being released as we speak)
a
Cool. Closed.
p
Oh my goodness, that was lightning fast! Thank you so much! ❤️