[GH-ISSUE #1753] Environment variables do not expand into request parameters #561

Closed
opened 2026-03-16 16:00:40 +03:00 by kerem · 2 comments
Owner

Originally created by @LuisMayo on GitHub (Aug 1, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1753

Describe the bug
Variables are not getting properly expanded in query parameters. They do get properly expanded in the url itself

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://hoppscotch.io/
  2. Click on "Environments"
  3. Create a new environment.
  4. Add a variable to said environment:
    image
  5. Select the environment as the current active one
  6. Use the variable in a query parameter
    image
  7. Check the response:
"args": {
    "test": "<<key>>"
  }
  1. As you can see, the variable didn't get expanded and we sent <<key>> to the server instead

Expected behavior
We should have sent value to the server, which is the value of the variable instead of <<key>>

Screenshots
Inlined

Desktop (please complete the following information):

  • OS: Windows 10 Education edition 1909
  • Browser: Google Chrome 92.0.4515.107
  • Version -

Additional context
EDIT: This seems too similar to #1603 . But that issue was closed without a proper solution, just a workaround (manually specifying query parameters in URL).

Originally created by @LuisMayo on GitHub (Aug 1, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1753 **Describe the bug** Variables are not getting properly expanded in query parameters. They do get properly expanded in the url itself **To Reproduce** Steps to reproduce the behavior: 1. Go to https://hoppscotch.io/ 2. Click on "Environments" 3. Create a new environment. 4. Add a variable to said environment: ![image](https://user-images.githubusercontent.com/20229636/127772820-3d33be3c-60a2-4299-bcef-f885c509a034.png) 5. Select the environment as the current active one 6. Use the variable in a query parameter ![image](https://user-images.githubusercontent.com/20229636/127772865-1c1ce035-7c12-485d-83f0-c9fb964e6eb3.png) 7. Check the response: ``` json "args": { "test": "<<key>>" } ``` 8. As you can see, the variable didn't get expanded and we sent `<<key>>` to the server instead **Expected behavior** We should have sent `value` to the server, which is the value of the variable instead of `<<key>>` **Screenshots** Inlined **Desktop (please complete the following information):** - OS: Windows 10 Education edition 1909 - Browser: Google Chrome 92.0.4515.107 - Version - **Additional context** EDIT: This seems too similar to #1603 . But that issue was closed without a proper solution, just a workaround (manually specifying query parameters in URL).
kerem 2026-03-16 16:00:40 +03:00
Author
Owner

@liyasthomas commented on GitHub (Aug 4, 2021):

This issue has been fixed and will be out in the next release.

<!-- gh-comment-id:892328365 --> @liyasthomas commented on GitHub (Aug 4, 2021): This issue has been fixed and will be out in the next release.
Author
Owner

@liyasthomas commented on GitHub (Aug 30, 2021):

With the release of v2 - we've introduced a new feature-rich, and more robust environments engine with support for "Global environments".

  • You can now sync environment variables with all sections in the request
  • Hover an environment variable within the request section to view its value
  • Environments are updated in real time so that you don't have to manually switch environments to take effect the changes - which fixed this issue.
<!-- gh-comment-id:908159721 --> @liyasthomas commented on GitHub (Aug 30, 2021): With the release of v2 - we've introduced a new feature-rich, and more robust environments engine with support for "Global environments". - You can now sync environment variables with all sections in the request - Hover an environment variable within the request section to view its value - Environments are updated in real time so that you don't have to manually switch environments to take effect the changes - which fixed this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#561
No description provided.