mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4747] [feature]: Add the ability to manage request variables from scripting context #1773
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#1773
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 @XWolfOverride on GitHub (Feb 12, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4747
Is there an existing issue for this?
Current behavior
Using
pw.env.getorpw.env.resolvein pre-request script does not fetch variables defined as request variables.Steps to reproduce
Create new request (to https://echo.hoppscotch.io for example)
Create a request variable (not global) for example "aaa" with a value
both "option" variables are
undefinedEnvironment
Production
Version
Cloud
@ImNicolasTheDev commented on GitHub (Feb 17, 2025):
This is
sadlyintended. We can still only get and set global environments variables. The issue tracking the progress of the implementation of, for example, get and set request variables is here: #4590@jamesgeorge007 commented on GitHub (Sep 30, 2025):
Hi, we've introduced a
hoppnamespace housing new scripting methods as proposed in https://github.com/hoppscotch/hoppscotch/discussions/5221 that includes support for managing request variables from the scripting context.It's not recommended to migrate or rework your existing scripts for the new scripting APIs just yet. Breaking changes are expected as the system evolves.
The rollout is intentionally gradual to gather feedback and refine based on real-world use. All future changes will be scoped to the experimental scripting sandbox (enabled by default; can be toggled in
Settings → Experiments). Please feel free to take it for a spin and let us know your feedback via the RFC above.