[GH-ISSUE #984] Saving response data in env variable #345

Closed
opened 2026-03-16 14:48:22 +03:00 by kerem · 1 comment
Owner

Originally created by @Sensanaty on GitHub (Jul 7, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/984

Is it possible to save a response into the environmental variables?

I'm building an API where I have to authenticate via a JWT, so first I send the credentials to my authenticate endpoint, then after that I included the JWT as a Bearer Token in future requests.

Is there a way to automatically save the response body into a env variable? I know I can do a pre-request script where I do pw.env.set (which doesn't work in the tests), but my token has a short lifespan of 5 minutes so I'd need to manually override this constantly.

Does this feature exist as of yet?

Originally created by @Sensanaty on GitHub (Jul 7, 2020). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/984 Is it possible to save a response into the environmental variables? I'm building an API where I have to authenticate via a JWT, so first I send the credentials to my `authenticate` endpoint, then after that I included the JWT as a Bearer Token in future requests. Is there a way to automatically save the response body into a env variable? I know I can do a pre-request script where I do `pw.env.set` (which doesn't work in the tests), but my token has a short lifespan of 5 minutes so I'd need to manually override this constantly. Does this feature exist as of yet?
kerem closed this issue 2026-03-16 14:48:27 +03:00
Author
Owner

@liyasthomas commented on GitHub (Jul 7, 2020):

At the moment there's no such feature to automatically save response data to environment.

<!-- gh-comment-id:654911006 --> @liyasthomas commented on GitHub (Jul 7, 2020): At the moment there's no such feature to automatically save response data to environment.
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#345
No description provided.