thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.62k stars 128 forks source link

Dynamic variable syntax in JSON body #1545

Closed bombillazo closed 4 months ago

bombillazo commented 4 months ago

Please describe feature/problem details and the solution you'd like.

Hello, there are cases where we'd like to have a value in the JSON body be dynamic, like when the value comes from the env, or we do not wish to hardcode and commit a value (like for password-related endpoints). This is what we'd like to have:

{
  "email": "example@domain.com",
  "password": "{{ENV_TEST_PASSWORD}}" // this if coming from env vars
  "password": "{TEST_PASSWORD}" // this if coming from local request vars (like the path vars)
}

Describe alternatives you've considered

Manually modify the JSON, but this is prone to error and could leak sensitive data via the saved collection requests.

Are you using the free version/paid version/trial:

Paid

rangav commented 4 months ago

@bombillazo this is already supported

have you tested it?

bombillazo commented 4 months ago

No, but now I tried and you're right. I only saw for path variables in the documentation so it was misleading me.