File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 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 {
249249 url : string ;
250250 status_code ?: number ;
251251 } = {
252- method,
252+ method : isString ( method ) ? method . toUpperCase ( ) : method ,
253253 url,
254254 } ;
255255
@@ -397,7 +397,7 @@ export class Breadcrumbs implements Integration {
397397 function ( this : SentryWrappedXMLHttpRequest , ...args : any [ ] ) : void {
398398 const url = args [ 1 ] ;
399399 this . __sentry_xhr__ = {
400- method : args [ 0 ] ,
400+ method : isString ( args [ 0 ] ) ? args [ 0 ] . toUpperCase ( ) : args [ 0 ] ,
401401 url : args [ 1 ] ,
402402 } ;
403403
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ describe("breadcrumbs", function() {
3232 function ( ) {
3333 return runInSandbox ( sandbox , { manual : true } , function ( ) {
3434 var xhr = new XMLHttpRequest ( ) ;
35- xhr . open ( "GET " , "/base/subjects/example.json" ) ;
35+ xhr . open ( "get " , "/base/subjects/example.json" ) ;
3636 xhr . send ( ) ;
3737 waitForXHR ( xhr , function ( ) {
3838 Sentry . captureMessage ( "test" ) ;
@@ -87,7 +87,9 @@ describe("breadcrumbs", function() {
8787
8888 it ( "should record a fetch request" , function ( ) {
8989 return runInSandbox ( sandbox , { manual : true } , function ( ) {
90- fetch ( "/base/subjects/example.json" )
90+ fetch ( "/base/subjects/example.json" , {
91+ method : "Get" ,
92+ } )
9193 . then (
9294 function ( ) {
9395 Sentry . captureMessage ( "test" ) ;
You can’t perform that action at this time.
0 commit comments