Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/browser/src/integrations/breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class Breadcrumbs implements Integration {
url: string;
status_code?: number;
} = {
method,
method: isString(method) ? method.toUpperCase() : method,
url,
};

Expand Down Expand Up @@ -397,7 +397,7 @@ export class Breadcrumbs implements Integration {
function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {
const url = args[1];
this.__sentry_xhr__ = {
method: args[0],
method: isString(args[0]) ? args[0].toUpperCase() : args[0],
url: args[1],
};

Expand Down
6 changes: 4 additions & 2 deletions packages/browser/test/integration/suites/breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("breadcrumbs", function() {
function() {
return runInSandbox(sandbox, { manual: true }, function() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "/base/subjects/example.json");
xhr.open("get", "/base/subjects/example.json");
xhr.send();
waitForXHR(xhr, function() {
Sentry.captureMessage("test");
Expand Down Expand Up @@ -87,7 +87,9 @@ describe("breadcrumbs", function() {

it("should record a fetch request", function() {
return runInSandbox(sandbox, { manual: true }, function() {
fetch("/base/subjects/example.json")
fetch("/base/subjects/example.json", {
method: "Get",
})
.then(
function() {
Sentry.captureMessage("test");
Expand Down