mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #1834] can't use an environment variable in request body #583
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#583
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 @sbocahu on GitHub (Sep 23, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1834
Describe the bug
environment <> should be useable within a raw request body, but it isn't
To Reproduce
create an env variable, eg "user"
use it (<>) into url: it works
use it (<>) into the raw request body textarea: it is not replaced with var content
Expected behavior
<> should be replaced with env var content
Screenshots

Desktop (please complete the following information):
chrome
@liyasthomas commented on GitHub (Sep 23, 2021):
@zecrazytux thank you reporting this behaviour. We'll be taking a look into this as soon as possible.
@dhivyasreedhar commented on GitHub (Sep 29, 2021):
Hi, can I work on this issue?
@liyasthomas commented on GitHub (Sep 29, 2021):
Hi @dhivyasreedhar, thanks for showing interest in working on this issue. You're free to take up this. I'm assigning it to you, contact us if you need any help.
@rishabhkalra96 commented on GitHub (Oct 4, 2021):
Hi @liyasthomas, Is this issue still been looked into?
I'd like to take this up if @dhivyasreedhar is no longer working on it.
@liyasthomas commented on GitHub (Oct 4, 2021):
Hi @rishabhkalra96, I guess you can pick up this, thanks for showing interest on contributing to Hoppscotch.
@rishabhkalra96 commented on GitHub (Oct 6, 2021):
Hi @liyasthomas Based on my primary investigation i think its not a bug but an enhancement. The expectation we have from the raw body is not implemented yet. I could be wrong, would love to have some guidance here.
Also, of note, i am just starting off with OSS and vue specifically, so i might take little bit more time than expected.
Also, can you please tell me which is the current branch for development ? Although i have come here from hacktoberfest, but i want to contribute more into the product outside of the fest too.
@liyasthomas commented on GitHub (Oct 9, 2021):
Hi @rishabhkalra96, you can create a branch with
mainas the base. Also, raise the PR to the main branch as well.And yes, environment support in the body is not a bug but rather an enhancement that hasn't been implemented. Let me know if you've any specific doubts from the codebases or in Vue.js - happy to help.
@0xc0Der commented on GitHub (Nov 12, 2021):
shouldn't this be closed?
@widdlepaws commented on GitHub (Dec 9, 2021):
hello :) when can we expect it to be delivered ? really looking forward to it !
Last release got packaged too early :') https://github.com/hoppscotch/hoppscotch/releases/tag/v2.1.0
@liyasthomas commented on GitHub (Dec 9, 2021):
This feature is already live on the production deployment: Hoppscotch.io. You can fetch the
latesttag if you're on Docker or fetch the latestmainbranch from Git to enjoy the latest changes.@widdlepaws commented on GitHub (Dec 9, 2021):
ah ok I now see that it works ! Just expected it would change color or pop up or something 😅
Thank you !
@humbertoarizah commented on GitHub (Mar 28, 2022):
Hi, I know this issue is already closed, but I tried to access to env variables within the body and it has been impossible. I have this notation in the body, for example:
{"account" : {
"username": "<>",
"email": "<>"
}}
And my response is not taking the env variables but the string (<>).
I don´t know if I´m doing anything wrong.
I would appreciated any help.
@AndrewBastin commented on GitHub (Mar 31, 2022):
@humbertoarizah you have gotten the syntax wrong. Environment Substituions are represented by using
<<ENV>>whereENVis the desired environment variable.@tripol commented on GitHub (Apr 8, 2022):
Hi I tried following the
<<ENV>>syntax and even though the color code confirms it is correct, I don't get the desired result.But when I type out the full URL instead (that is without the
<<ENV>>syntax, I get the correct result.Please any idea why?
@GuilhermeViterboGalvao commented on GitHub (May 27, 2022):
Same problem as @tripol !