René's URL Explorer Experiment


Title: Use fetch if XMLHttpRequest not available · Issue #930 · getsentry/sentry-javascript · GitHub

Open Graph Title: Use fetch if XMLHttpRequest not available · Issue #930 · getsentry/sentry-javascript

X Title: Use fetch if XMLHttpRequest not available · Issue #930 · getsentry/sentry-javascript

Description: Do you want to request a feature or report a bug? Feature What is the current behavior? When attempting to use raven-js in a ServiceWorker, Raven._makeRequest will fail because XMLHttpRequest is not available to SW environments. What is ...

Open Graph Description: Do you want to request a feature or report a bug? Feature What is the current behavior? When attempting to use raven-js in a ServiceWorker, Raven._makeRequest will fail because XMLHttpRequest is no...

X Description: Do you want to request a feature or report a bug? Feature What is the current behavior? When attempting to use raven-js in a ServiceWorker, Raven._makeRequest will fail because XMLHttpRequest is no...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/930

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use fetch if XMLHttpRequest not available","articleBody":"**Do you want to request a *feature* or report a *bug*?**\r\nFeature\r\n\r\n**What is the current behavior?**\r\nWhen attempting to use raven-js in a ServiceWorker, `Raven._makeRequest` will fail because `XMLHttpRequest` is not available to SW environments.\r\n\r\n**What is the expected behavior?**\r\nUse the `fetch` api when available.\r\n\r\nWhich versions of Raven.js, and which browser and OS are affected by this issue?\r\nAll\r\n\r\nDid this work in previous versions of Raven.js? \r\nNo \r\n\r\nAre you using the CDN (http://ravenjs.com)? \r\nNo \r\n\r\nAre you using [hosted Sentry](https://sentry.io) or on-premises? \r\nHosted\r\n\r\nI put in a really quick hack into our /sw.js to make it work:\r\n\r\n```js\r\nRaven._makeRequest = (opts) => {\r\n  const auth = Object.keys(opts.auth).map((key) => `${key}=${opts.auth[key]}`).join('&');\r\n  const headers = new Headers();\r\n  headers.append('origin', self.location.origin);\r\n  const req = new Request(`${opts.url}?${auth}`, {\r\n    method: 'POST',\r\n    body: new Blob([ JSON.stringify({ ...opts.data, ...opts.auth }, null, 2)], { type: 'application/json' }),\r\n    mode: 'cors',\r\n    credentials: 'omit',\r\n    headers,\r\n    referrer: self.location.origin\r\n  });\r\n\r\n  fetch(req);\r\n}\r\n```","author":{"url":"https://github.com/paularmstrong","@type":"Person","name":"paularmstrong"},"datePublished":"2017-04-12T18:38:11Z","url":"https://github.com/getsentry/sentry-javascript/issues/930"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:74cd51d8-85b3-a4b4-4288-5ca64c9cf201
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDC14:2815D1:44DD:5EA2:6B0460C5
html-safe-nonce825fb2d2b219e9e891eb7ad02b4d12c7ca0c1e0947e9dff7c2fb5e3cead1c8b8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzE0OjI4MTVEMTo0NEREOjVFQTI6NkIwNDYwQzUiLCJ2aXNpdG9yX2lkIjoiODcwMzE2ODU4MDQ2NjAwODI2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1b25332b8419c88304ee706a7a5f45dbf22b92e18ec3f8ba430372adef4d53f3
hovercard-subject-tagissue:221353066
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/930/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5155a5c5ce0de020232845eb015137c2cbb7d583952a86c1a99d0b936e7cfcc7/getsentry/sentry-javascript/issues/930
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5155a5c5ce0de020232845eb015137c2cbb7d583952a86c1a99d0b936e7cfcc7/getsentry/sentry-javascript/issues/930
og:image:altDo you want to request a feature or report a bug? Feature What is the current behavior? When attempting to use raven-js in a ServiceWorker, Raven._makeRequest will fail because XMLHttpRequest is no...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepaularmstrong
hostnamegithub.com
expected-hostnamegithub.com
None2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release03e114520787ad27289207f153520ef97461127c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/930#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F930
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F930
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/930
Reloadhttps://github.com/getsentry/sentry-javascript/issues/930
Reloadhttps://github.com/getsentry/sentry-javascript/issues/930
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues340 (340)https://github.com/getsentry/sentry-javascript/issues
Pull requests55 (55)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/930
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/930
Use fetch if XMLHttpRequest not availablehttps://github.com/getsentry/sentry-javascript/issues/930#top
https://github.com/paularmstrong
paularmstronghttps://github.com/paularmstrong
on Apr 12, 2017https://github.com/getsentry/sentry-javascript/issues/930#issue-221353066
http://ravenjs.comhttp://ravenjs.com
hosted Sentryhttps://sentry.io
https://github.com/LewisJEllis
LewisJEllishttps://github.com/LewisJEllis
on Apr 26, 2017https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-297227952
this chromium issue on the XHR removalhttps://bugs.chromium.org/p/chromium/issues/detail?id=395931
https://github.com/mayfield
mayfieldhttps://github.com/mayfield
on Jun 27, 2017https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-311240690
https://github.com/josketres
josketreshttps://github.com/josketres
on Jul 5, 2017https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-313230290
kamilogorekhttps://github.com/kamilogorek
Hacktoberfesthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Hacktoberfest%22
Misc: Good First Contributionhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Misc%3A%20Good%20First%20Contribution%22
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
on Oct 9, 2017https://github.com/getsentry/sentry-javascript/issues/930#event-1284097840
https://github.com/kamilogorek
kamilogorekhttps://github.com/kamilogorek
on Oct 9, 2017https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-335156316
https://github.com/getsentry/raven-js/blob/master/src/raven.js#L1805https://github.com/getsentry/raven-js/blob/master/src/raven.js#L1805
austinprayhttps://github.com/austinpray
on Oct 31, 2017https://github.com/getsentry/sentry-javascript/issues/930#event-1319796573
Prefer fetch API over XHRhttps://github.com/austinpray/raven-js/commit/58d91c183b5cd2a15afbdc795f44566af894a8b0
58d91c1https://github.com/austinpray/raven-js/commit/58d91c183b5cd2a15afbdc795f44566af894a8b0
https://github.com/austinpray
austinprayhttps://github.com/austinpray
on Oct 31, 2017https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-340919415
kamilogorekhttps://github.com/kamilogorek
Hacktoberfesthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Hacktoberfest%22
on Nov 2, 2017https://github.com/getsentry/sentry-javascript/issues/930#event-1322913571
austinprayhttps://github.com/austinpray
on Nov 2, 2017https://github.com/getsentry/sentry-javascript/issues/930#event-1323574688
Prefer fetch API over XHRhttps://github.com/austinpray/raven-js/commit/41f4bf5f3dd274c93738938b35eaf2c0a5428ea9
41f4bf5https://github.com/austinpray/raven-js/commit/41f4bf5f3dd274c93738938b35eaf2c0a5428ea9
nimishsinghalhttps://github.com/nimishsinghal
on Nov 17, 2017https://github.com/getsentry/sentry-javascript/issues/930#event-1346999613
Prefer fetch API over XHRhttps://github.com/grofers/raven-js/commit/d3226ea64defd66bf95ea8974339b9a3828fa5af
d3226eahttps://github.com/grofers/raven-js/commit/d3226ea64defd66bf95ea8974339b9a3828fa5af
https://github.com/mayfield
mayfieldhttps://github.com/mayfield
on Nov 30, 2017https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-348066255
#1156https://github.com/getsentry/sentry-javascript/pull/1156
https://github.com/kamilogorek
kamilogorekhttps://github.com/kamilogorek
on Nov 30, 2017https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-348313548
#1157https://github.com/getsentry/sentry-javascript/pull/1157
kamilogorekhttps://github.com/kamilogorek
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 30, 2017https://github.com/getsentry/sentry-javascript/issues/930#event-1366469491
onurtemizkanhttps://github.com/onurtemizkan
Status: Solvedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Solved%22
Type: Featurehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Type%3A%20Feature%22
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
on Aug 8, 2021https://github.com/getsentry/sentry-javascript/issues/930#event-5126649313
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Apr 8, 2025https://github.com/getsentry/sentry-javascript/issues/930#issuecomment-2786618840
GitHub Actionshttps://help.github.com/en/actions
#15971https://github.com/getsentry/sentry-javascript/pull/15971
9.12.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/9.12.0
pullhttps://github.com/apps/pull
on Jun 19, 2026https://github.com/getsentry/sentry-javascript/issues/930#event-26965028431
chore: fix craft config (getsentry#930)https://github.com/TheDegenerateDev5150/sentry-javascript/commit/06fde9e75889d992d6a627ed17a5eacceb5fc19e
getsentry#930https://github.com/getsentry/sentry-javascript/issues/930
06fde9ehttps://github.com/TheDegenerateDev5150/sentry-javascript/commit/06fde9e75889d992d6a627ed17a5eacceb5fc19e
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/930
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/930
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.