Open
Description
Thank you!
Some webhooks services like MangoPay use GET requests with query params with ids for security reasons.
Would be useful to allow the queryStringParam/pathParam to be use in - eventbridge: detail:
Something like this:
// compileMethodsToEventBridge.js
getEventBridgeDetail(http) {
if (!_.has(http, 'detail')) {
return '$util.escapeJavaScript($input.body)'
}
if (http.detail.pathParam) {
return `{"${http.detail.pathParam}": "$input.params().path.${http.detail.pathParam}"}`.replace(/\"/g, "\\\"")
}
if (http.detail.queryStringParam) {
return `{"${http.detail.queryStringParam}": "$input.params().querystring.${http.detail.queryStringParam}"}`.replace(/\"/g, "\\\"")
}
if (http.detail.bodyParam) {
return `$util.escapeJavaScript($util.parseJson($input.body).${http.detail.bodyParam})`
}
return '$util.escapeJavaScript($input.body)'
},
Regards!