It’s pretty standard when encoding a list as GET parameters to duplicate the key for each entry of the list. This is, for instance, the default behaviour when calling an API via Retrofit in Java (see: https://square.github.io/retrofit/2.x/retrofit/) , or when submitting a form (see eg: http://stackoverflow.com/questions/2602043/rest-api-best-practice-how-to-accept-list-of-parameter-values-as-input)
However if I pass multiple identical query parameters to a Serverless Lambda, the event['queryStringParameter']
dictionary only contains the last key, so e.g. some_url?q[]=cat&q[]=dog
ends up giving me {"q[]": "dog"}
as the entire event['queryStringParameter']
.
This makes it impossible to build serverless APIs that ever have duplicated query parameters which seems unfortunate.