Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http plugin tests #6753

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/native-bridge.ts
Expand Up @@ -466,7 +466,7 @@

if (doPatchHttp) {
// fetch patch
window.fetch = async (
win.fetch = async (
resource: RequestInfo | URL,
options?: RequestInit,
) => {
Expand Down Expand Up @@ -549,7 +549,7 @@
new (): XMLHttpRequest;
}

window.XMLHttpRequest = function () {
win.XMLHttpRequest = function () {
const xhr = new win.CapacitorWebXMLHttpRequest.constructor();
Object.defineProperties(xhr, {
_headers: {
Expand Down Expand Up @@ -1065,7 +1065,7 @@
});
};

cap.withPlugin = (_pluginId, _fn) => dummy;

Check warning on line 1068 in core/native-bridge.ts

View workflow job for this annotation

GitHub Actions / lint

'_pluginId' is defined but never used

Check warning on line 1068 in core/native-bridge.ts

View workflow job for this annotation

GitHub Actions / lint

'_fn' is defined but never used

cap.Exception = CapacitorException;

Expand Down
2 changes: 2 additions & 0 deletions core/src/definitions-internal.ts
Expand Up @@ -213,6 +213,8 @@ export interface WindowCapacitor {
exitApp?: () => void;
};
};
fetch?: typeof window.fetch;
XMLHttpRequest?: typeof window.XMLHttpRequest;
}

export interface CapFormDataEntry {
Expand Down