sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

fix(core): Parse method from Request object in fetch

Open github-actions[bot] opened this issue 1 month ago • 1 comments

[!NOTE] The pull request "fix(core): Parse method from Request object in fetch" was created by @s1gr1d but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.

Fixes the case that the instrumentation defaulted to GET in case undefined was parsed as a second fetch argument.

const request = new Request("https://httpbin.org/post", { method: "POST" });

const response = await fetch(request, undefined);   // <-- will be GET (should be POST)

github-actions[bot] avatar Dec 10 '25 09:12 github-actions[bot]

JS-1283

linear[bot] avatar Dec 10 '25 09:12 linear[bot]