mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #2205] [feature]: Function to send request from pre-request script #752
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#752
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 @greg-vstorm on GitHub (Mar 25, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2205
Is there an existing issue for this?
Summary
Postman provides method
sendRequestto make AJAX request from pre-request script. For example:This feature is useful when you need to get for example xsrf-token,
Why should this be worked on?
Allow testing API's build with Laravel Scout to get xsrf-token. I think it's much more use cases than this one.
@AndrewBastin commented on GitHub (Mar 27, 2022):
Thank you for reporting.
We will consider this during the planned revamp of the Scripting System.
@wakeupmh commented on GitHub (Mar 31, 2022):
Send request is a missing great feature, please, can you priorize this? 🥺
@AndrewBastin
@AndrewBastin commented on GitHub (Mar 31, 2022):
Yup, I am working on a solution for this, stay tuned!
@987Nabil commented on GitHub (Aug 5, 2022):
@AndrewBastin Any news on this?
@lslavuj commented on GitHub (Oct 19, 2022):
@AndrewBastin Any news?
@AndrewBastin commented on GitHub (Oct 22, 2022):
Please discuss about this in the RFC discussion #2292 for the scripting API revamp.
We are working on a scripting API revamp to support for more complex use cases.
@lathindu1 commented on GitHub (Feb 16, 2023):
Any update guys. can we get CSRF token in Pre-request scripts now ? We really need it's to test Laravel
@laDanz commented on GitHub (Nov 7, 2023):
Still waiting for this, would really improve my user experience...
I guess it should not be closed, even if it is mentioned on #2292 ?
All other mentioned features on #2292 are not closed...
@bforbis commented on GitHub (Nov 16, 2023):
Would like to add my +1 support for this feature, as it is making it difficult for me to migrate from Postman.
My Use Case: A pre-request script that handles creation of OAuth 2.0 client_credentials grant access token before the request, then stores both the access token and expiration in environment variables.
I have been using this in postman before Postman even added OAuth 2 support, and it's a great way to get around the lack of Hoppscotch support for OAuth 2.0 client_credentials grant (see https://github.com/hoppscotch/hoppscotch/issues/874)
It would be really great if these pre-request scripts could then be stored at the collection level and shared.
@nandi95 commented on GitHub (Apr 25, 2024):
Why was this issue closed?
@andras-gyarmati commented on GitHub (Jun 10, 2024):
id also need this feature. please update us
@FarhanShares commented on GitHub (Aug 19, 2024):
Aug 19, 2024: Any updates? This is a much needed feature.
@dreamscached commented on GitHub (Feb 13, 2025):
Bumping, is that a thing yet?
@Nackophilz commented on GitHub (Jul 18, 2025):
Bump, 2025 still need this feature .. ^^
@laDanz commented on GitHub (Jul 30, 2025):
leaving hopscotch for bruno.
@jamesgeorge007 commented on GitHub (Aug 4, 2025):
Hi, we have an updated RFC for the revamped scripting system that covers the above scope. We’d appreciate reviews and feedback directly on the RFC itself, so we can keep the discussion focused and productive.