AnomalyInnovations / aws-api-gateway-cli-test

A simple CLI to test API Gateway endpoints with IAM authorization
MIT License
121 stars 29 forks source link

--additional-params argument not working? #29

Open shaunhurley opened 2 years ago

shaunhurley commented 2 years ago

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 commented 2 years ago

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? :)