问题描述
我正在尝试在Amazon API网关上创建一个新API,但是对于我的用例,我想为请求参数中的单个键连接2个值.如何在integration.requestParameters
中为单个键指定多个值?
I'm trying to create a new API on Amazon API gateway but for my use-case I want to concatenate 2 values for a single key in request parameters. How can we specify multiple values for a single key in integration.requestParameters
?
这是我要实现的目标,但是语法不正确,并且给我错误:
This is what I'm trying to achieve but the syntax is not correct and it's giving me error:
对于一对一的映射,我们使用类似的东西
For one to one mapping we use something like this
integration.request.querystring.start: "method.request.querystring.oauth_code"
推荐答案
我能够按照以下 Stackoverflow回答中的说明解决问题.
基本上,您需要在集成请求的端点URL本身中添加多个参数,请确保您将这些参数作为集成请求中的URL路径参数接受.
Basically you need to add multiple parameters in the endpoint URL itself in the integration request, make sure that you are accepting those parameters as URL Path Parameters in the Integration Request.
这篇关于为单个键映射x-amazon-apigateway-integration.requestParameters的多个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!