aws-api-gateway-cli-test icon indicating copy to clipboard operation
aws-api-gateway-cli-test copied to clipboard

--additional-params argument not working?

Open shaunhurley opened this issue 3 years ago • 1 comments
trafficstars

It appears that parameters passed into a GET method call with the --additional-params options are being ignored.

I'm able to successfully invoke DELETE, POST, PUT - so my cognito elements and the basic mechanisms are all good - and I can call GET with a path parameter, however anything I try to pass in as a querystring is ignored.

I've tried with escaped double quote JSON from windows i.e. --additional-params "{\"name\":\"value\"}" as well as standard singe quoted JSON under Linux i.e. --additional-params '{"name":"value"}'

Note: the escaped quotes succeeds for JSON submitted in the --body parameter under window.

Am I missing something obvious?

Thanks!

shaunhurley avatar Apr 03 '22 20:04 shaunhurley

OK, so when I RTFM really really closely, I figured it out i.e. that the query string params have to be wrapped in a {"queryParams": {}"} inside the additional-params arguments in order to be picked up.

I feel like it wouldn't hurt to call that it out in the spec for the additional-params parameter further up in the readme, rather than embedded in the example further down?

Pull Request would be accepted? :)

shaunhurley avatar Apr 03 '22 23:04 shaunhurley