File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ export class Breadcrumbs implements Integration {
249
249
url : string ;
250
250
status_code ?: number ;
251
251
} = {
252
- method,
252
+ method : isString ( method ) ? method . toUpperCase ( ) : method ,
253
253
url,
254
254
} ;
255
255
@@ -397,7 +397,7 @@ export class Breadcrumbs implements Integration {
397
397
function ( this : SentryWrappedXMLHttpRequest , ...args : any [ ] ) : void {
398
398
const url = args [ 1 ] ;
399
399
this . __sentry_xhr__ = {
400
- method : args [ 0 ] ,
400
+ method : isString ( args [ 0 ] ) ? args [ 0 ] . toUpperCase ( ) : args [ 0 ] ,
401
401
url : args [ 1 ] ,
402
402
} ;
403
403
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ describe("breadcrumbs", function() {
32
32
function ( ) {
33
33
return runInSandbox ( sandbox , { manual : true } , function ( ) {
34
34
var xhr = new XMLHttpRequest ( ) ;
35
- xhr . open ( "GET " , "/base/subjects/example.json" ) ;
35
+ xhr . open ( "get " , "/base/subjects/example.json" ) ;
36
36
xhr . send ( ) ;
37
37
waitForXHR ( xhr , function ( ) {
38
38
Sentry . captureMessage ( "test" ) ;
@@ -87,7 +87,9 @@ describe("breadcrumbs", function() {
87
87
88
88
it ( "should record a fetch request" , function ( ) {
89
89
return runInSandbox ( sandbox , { manual : true } , function ( ) {
90
- fetch ( "/base/subjects/example.json" )
90
+ fetch ( "/base/subjects/example.json" , {
91
+ method : "Get" ,
92
+ } )
91
93
. then (
92
94
function ( ) {
93
95
Sentry . captureMessage ( "test" ) ;
You can’t perform that action at this time.
0 commit comments