mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4695] [feature]: pw.globals.env.set feature #1749
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1749
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nesimii on GitHub (Jan 24, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4695
Is there an existing issue for this?
Summary
In Postman;
pm.globals.set("accessToken", accessToken);
pm.globals.set("refreshToken", refreshToken);
Why should this be worked on?
In the postman application, data from the response can be saved in the global environment table, can you add it?
@yunhao-jiang commented on GitHub (Jun 24, 2025):
According to the following code:
github.com/hoppscotch/hoppscotch@580cf60766/packages/hoppscotch-js-sandbox/src/shared-utils.ts (L31C1-L57C4)It seems
pw.env.set()will set a global environment when:So to make it set to global variable, you have to remove the corresponding variable in your local environment variable and add a new (blank) entry in the global one. Then it will save to the global variable (an icon will show up).
I do think that there should be a better documentation on this implementation or simply add another method that only updates global variable.