Skip to content

Commit 1fd2d87

Browse files
authored
fix: add http method to prototype.open (#6740)
1 parent 67c7f6e commit 1fd2d87

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

android/capacitor/src/main/assets/native-bridge.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ var nativeBridge = (function (exports) {
528528
// XHR patch open
529529
prototype.open = function (method, url) {
530530
this._url = url;
531+
this._method = method;
531532
if (!(url.startsWith('http:') || url.toString().startsWith('https:'))) {
532533
return win.CapacitorWebXMLHttpRequest.open.call(this, method, url);
533534
}

core/native-bridge.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ const initBridge = (w: any): void => {
610610
// XHR patch open
611611
prototype.open = function (method: string, url: string) {
612612
this._url = url;
613+
this._method = method;
613614

614615
if (
615616
!(url.startsWith('http:') || url.toString().startsWith('https:'))

ios/Capacitor/Capacitor/assets/native-bridge.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ var nativeBridge = (function (exports) {
528528
// XHR patch open
529529
prototype.open = function (method, url) {
530530
this._url = url;
531+
this._method = method;
531532
if (!(url.startsWith('http:') || url.toString().startsWith('https:'))) {
532533
return win.CapacitorWebXMLHttpRequest.open.call(this, method, url);
533534
}

0 commit comments

Comments
 (0)