https://kotlinlang.org logo
#http4k
Title
# http4k
p

Pedro Sousa

10/08/2023, 7:01 PM
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

s4nchez

10/08/2023, 7:50 PM
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

Pedro Sousa

10/08/2023, 8:46 PM
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

Andrew O'Hara

10/09/2023, 6:32 PM
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

s4nchez

10/09/2023, 6:42 PM
I've added that (see PR) and it'll be available in 5.8.4.0 (being released as we speak)
a

Andrew O'Hara

10/09/2023, 6:51 PM
Cool. Closed.
p

Pedro Sousa

10/09/2023, 7:11 PM
Oh my goodness, that was lightning fast! Thank you so much! ❤️
2 Views