mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #4558] [feature]: Interceptor integration with request sending abilities in the scripting context #1676
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#1676
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 @norcino on GitHub (Nov 25, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4558
Originally assigned to: @jamesgeorge007 on GitHub.
Is there an existing issue for this?
Current behavior
When I try to send an HTTP request from within the Pre-request Script, there requests don't go through the configured Interceptor, I tried with the agent and the browser extension.
the same request work fine if sent from a standard Request tab.
If I try to use mode no-cors I don't get error but I cannot access the response from the call.
Affects both web and local.
Steps to reproduce
const basicAuthHeaderValue = btoa(pw.env.get("username") + ':' + pw.env.get("password"));
const url =
MY-URL;fetch(url, {
method: 'GET',
// mode: 'no-cors',
header: {
'Authorization':
Basic ${basicAuthHeaderValue},'Content-Type': 'application/json; charset=utf-8'
}
}).then(res => {
return res.text();
}).then(bearerToken => {
[...]
}).catch(err => console.error("Ups..", err));
}
Environment
Production
Version
Local
@filipjnc commented on GitHub (Apr 16, 2025):
I have the same, rendering pre-request scripts useless. Any suggestions?
@romil4 commented on GitHub (May 8, 2025):
Same here. Kindly advise.
@jamesgeorge007 commented on GitHub (Nov 19, 2025):
#5596 is now up, implementing
fetch(),hopp.fetch(), andpm.sendRequest()in the experimental scripting sandbox as part of the ongoing scripting improvements (#5221). This enables making HTTP requests from the scripting context with interceptor integration.@jamesgeorge007 commented on GitHub (Nov 27, 2025):
Closing since the respective scripting enhancements are now live with the v2025.11.0 release.