Instead of boolean for local invocations, added InvokeMode enum for FUNCTION, LOCAL and APIM. Fixed query string to not have the equal sign encoded into %3D by using the querystring package. Added tests.
How can we verify it:
Deploy a function app with APIM configured (apim: true), and then run sls invoke apim ... like you would invoke your function normally. You will see the APIM endpoint logged to the console and the result is returned like normal.
Todos:
Note: Run npm run test:ci to run all validation checks on proposed changes
[x] Ensure there are no lint errors. Validate via npm run lint Note: Some reported issues can be automatically fixed by running npm run lint:fix
[x] Write tests and confirm existing functionality is not broken. Validate via npm test
[x] Write documentation
[x] Provide verification config / commands / resources
[x] Enable "Allow edits from maintainers" for this PR
[x] Update the messages below
Is this ready for review?: YES Is it a breaking change?: NO
What did you implement:
Invocation for APIM endpoint.
How did you implement it:
Instead of boolean for
local
invocations, addedInvokeMode
enum forFUNCTION
,LOCAL
andAPIM
. Fixed query string to not have the equal sign encoded into%3D
by using thequerystring
package. Added tests.How can we verify it:
Deploy a function app with APIM configured (
apim: true
), and then runsls invoke apim ...
like you would invoke your function normally. You will see the APIM endpoint logged to the console and the result is returned like normal.Todos:
Note: Run
npm run test:ci
to run all validation checks on proposed changesValidate via
npm run lint
Note: Some reported issues can be automatically fixed by running
npm run lint:fix
Validate via
npm test
Is this ready for review?: YES
Is it a breaking change?: NO