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

Method abort

Libraries/Network/XMLHttpRequest.js:509–524  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

507 }
508
509 abort(): void {
510 this._aborted = true;
511 if (this._requestId) {
512 RCTNetworking.abortRequest(this._requestId);
513 }
514 // only call onreadystatechange if there is something to abort,
515 // below logic is per spec
516 if (!(this.readyState === this.UNSENT ||
517 (this.readyState === this.OPENED && !this._sent) ||
518 this.readyState === this.DONE)) {
519 this._reset();
520 this.setReadyState(this.DONE);
521 }
522 // Reset again after, in case modified in handler
523 this._reset();
524 }
525
526 setResponseHeaders(responseHeaders: ?Object): void {
527 this.responseHeaders = responseHeaders || null;

Callers 10

loadTimeOutRequestMethod · 0.45
componentWillUnmountMethod · 0.45
downloadFunction · 0.45
componentWillUnmountFunction · 0.45
downloadFunction · 0.45
componentWillUnmountFunction · 0.45
XHRExampleDownloadClass · 0.45
componentWillUnmountMethod · 0.45
downloadMethod · 0.45
componentWillUnmountMethod · 0.45

Calls 3

_resetMethod · 0.95
setReadyStateMethod · 0.95
abortRequestMethod · 0.45

Tested by

no test coverage detected