MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / open

Method open

Libraries/Network/XMLHttpRequest.js:433–449  ·  view source on GitHub ↗
(method: string, url: string, async: ?boolean)

Source from the content-addressed store, hash-verified

431 }
432
433 open(method: string, url: string, async: ?boolean): void {
434 /* Other optional arguments are not supported yet */
435 if (this.readyState !== this.UNSENT) {
436 throw new Error('Cannot open, already sending');
437 }
438 if (async !== undefined && !async) {
439 // async is default
440 throw new Error('Synchronous http requests are not supported');
441 }
442 if (!url) {
443 throw new Error('Cannot load an empty url');
444 }
445 this._method = method.toUpperCase();
446 this._url = url;
447 this._aborted = false;
448 this.setReadyState(this.OPENED);
449 }
450
451 send(data: any): void {
452 if (this.readyState !== this.OPENED) {

Callers 11

_uploadFunction · 0.95
loadTimeOutRequestMethod · 0.45
downloadFunction · 0.45
downloadFunction · 0.45
XHRExampleDownloadClass · 0.45
downloadMethod · 0.45

Calls 1

setReadyStateMethod · 0.95

Tested by

no test coverage detected