{"action":"closed","issue":{"url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/188","repository_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer","labels_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/188/comments","events_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/188/events","html_url":"https://github.com/awslabs/aws-apigateway-importer/issues/188","id":146184244,"number":188,"title":"x-amazon-apigateway-integration doesn't escape querystring parameters","user":{"login":"sylwit","id":395413,"avatar_url":"https://avatars.githubusercontent.com/u/395413?v=3","gravatar_id":"","url":"https://api.github.com/users/sylwit","html_url":"https://github.com/sylwit","followers_url":"https://api.github.com/users/sylwit/followers","following_url":"https://api.github.com/users/sylwit/following{/other_user}","gists_url":"https://api.github.com/users/sylwit/gists{/gist_id}","starred_url":"https://api.github.com/users/sylwit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylwit/subscriptions","organizations_url":"https://api.github.com/users/sylwit/orgs","repos_url":"https://api.github.com/users/sylwit/repos","events_url":"https://api.github.com/users/sylwit/events{/privacy}","received_events_url":"https://api.github.com/users/sylwit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-06T04:33:43Z","updated_at":"2016-04-06T18:14:52Z","closed_at":"2016-04-06T18:14:52Z","body":"Hi all,\r\n\r\nit looks like the mapping of the query string between integration ans method request doesn't escape the value\r\n\r\n```\r\n          \"requestParameters\": {\r\n            \"integration.request.querystring.filters\": \"method.request.querystring.filters\"\r\n          },\r\n```\r\n\r\nI use this filter param in that way\r\n\r\n> /users?filters={\"lastname\":\"Doe\"}\r\n\r\nThis work perfectly on the API using the beanstalk URL but when I try it by the gateway I get a 400 error. Moreover, if I test the method via the console it works perfectly. So the issue must be in the mapping. If I remove the following special chars { : }, it works (well no 400 error)\r\n\r\nThanks to the documentation\r\nhttp://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#input-variable-reference I found this : If the JSON input contains unescaped characters that cannot be parsed by JavaScript, a 400 response may be returned. Applying $util.escapeJavaScript() function will ensure that the JSON input can be parsed properly.\r\n\r\nAny idea would be appreciate.\r\n\r\nThank you\r\n"}}