-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
queryParams No Longer Working #619
Comments
Hi @daniel-klingensmith-jamf, I'm not able to reproduce this locally: mock-config.yamlplugin: rest
resources:
- method: GET
path: "/v1/assets-and-licenses"
queryParams:
accountId: 1001
response:
file: account-1001.json account-1001.json
Command
Logs
Perhaps there's other configuration conflicting with this resource? Also, does this happen locally for you or just in Lambda? |
Also seems to work when deployed to Lambda:
|
I tried a few permutations and found that the issue happens when the Query Parameter starts with a '0'. I did some cleanup of the scenario before opening the ticket so hadn't run exactly what I had used in the original comment.
|
Ah, OK. In YAML 1.1, a value starting with a zero is interpreted as octal. So
Sadly Jackson, which is used for YAML parsing in this project, makes use of a version of snakeyaml that supports YAML 1.1, not 1.2. For your use-case, you can quote the value in the config file as Hope this helps! |
Query Parameters on 4.0.3 are working for me now after quoting, thanks again! |
I'm unable to get
queryParams
to work since the change to how they are processed. Neither of the following syntaxes seems to work.or
Request:
https://<lambda>.lambda-url.us-east-1.on.aws/v1/assets-and-licenses?accountId=1001
Imposter Logs:
Running Imposter 4.0.3 by zip file in S3
The text was updated successfully, but these errors were encountered: