Skip to content

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

@github-actions

Description

@github-actions

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions