MCPcopy Create free account
hub / github.com/axios/axios / constructor

Method constructor

tests/browser/progress.browser.test.js:6–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5class MockXMLHttpRequest {
6 constructor() {
7 this.requestHeaders = {};
8 this.responseHeaders = {};
9 this.readyState = 0;
10 this.status = 0;
11 this.statusText = '';
12 this.responseText = '';
13 this.response = null;
14 this.timeout = 0;
15 this.withCredentials = false;
16 this.onreadystatechange = null;
17 this.onloadend = null;
18 this.onabort = null;
19 this.onerror = null;
20 this.ontimeout = null;
21 this._listeners = {};
22 this._uploadListeners = {};
23 this.upload = {
24 addEventListener: (type, listener) => {
25 this._uploadListeners[type] ||= [];
26 this._uploadListeners[type].push(listener);
27 },
28 };
29 }
30
31 open(method, url, async = true) {
32 this.method = method;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected