diff --git a/android/capacitor/src/main/assets/native-bridge.js b/android/capacitor/src/main/assets/native-bridge.js index 59b22caadb..898d9d6386 100644 --- a/android/capacitor/src/main/assets/native-bridge.js +++ b/android/capacitor/src/main/assets/native-bridge.js @@ -528,6 +528,7 @@ var nativeBridge = (function (exports) { // XHR patch open prototype.open = function (method, url) { this._url = url; + this._method = method; if (!(url.startsWith('http:') || url.toString().startsWith('https:'))) { return win.CapacitorWebXMLHttpRequest.open.call(this, method, url); } diff --git a/core/native-bridge.ts b/core/native-bridge.ts index c691036603..021b4523ad 100644 --- a/core/native-bridge.ts +++ b/core/native-bridge.ts @@ -610,6 +610,7 @@ const initBridge = (w: any): void => { // XHR patch open prototype.open = function (method: string, url: string) { this._url = url; + this._method = method; if ( !(url.startsWith('http:') || url.toString().startsWith('https:')) diff --git a/ios/Capacitor/Capacitor/assets/native-bridge.js b/ios/Capacitor/Capacitor/assets/native-bridge.js index 59b22caadb..898d9d6386 100644 --- a/ios/Capacitor/Capacitor/assets/native-bridge.js +++ b/ios/Capacitor/Capacitor/assets/native-bridge.js @@ -528,6 +528,7 @@ var nativeBridge = (function (exports) { // XHR patch open prototype.open = function (method, url) { this._url = url; + this._method = method; if (!(url.startsWith('http:') || url.toString().startsWith('https:'))) { return win.CapacitorWebXMLHttpRequest.open.call(this, method, url); }