如何将数组查询参数传递给AWS API Gateway? [英] How to pass array query params to AWS API Gateway?

查看:94
本文介绍了如何将数组查询参数传递给AWS API Gateway?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Rails API通常喜欢这样的数组查询参数:

A Rails API typically likes array query params like this:

example.com?colors[]=cyan&colors[]=magenta&colors[]=yellow&colors[]=black

我如何将其映射到lambda函数?

How would I map that through to a lambda function?

推荐答案

一些试验和错误表明它是这样的:

A little trial and error shows that it's like this:

example.com?colors=['cyan','magenta','yellow','black']

这篇关于如何将数组查询参数传递给AWS API Gateway?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆