0
我的API的形式为:如何在AWS API网关的正文映射模板中定义URL查询参数?
https://<>.execute-api.us-east-1.amazonaws.com/Testing/api/v1/mobs/<>.json?filename=<>.json&assertion=1
目前,我刚才定义,直到我的映射模板的.../mobs/<>.json
,就像这样:
{
"mob_type": "$input.params('type')"
}
现在,我添加查询参数的URL,它们是filename
和assertion
。那么,我如何在Body Mapping Template中定义它们呢?
这不起作用:
{
"mob_type": "$input.params('type')"
"filename": "$input.params('filename')"
"assertion": "$input.params('assertion')"
}