MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / open

Method open

packages/core/xhr/index.ts:191–206  ·  view source on GitHub ↗
(method: string, url: string, async?: boolean, user?: string, password?: string)

Source from the content-addressed store, hash-verified

189 }
190
191 public open(method: string, url: string, async?: boolean, user?: string, password?: string) {
192 if (isString(method) && isString(url)) {
193 this._options = { url: url, method: method };
194 this._options.headers = {};
195
196 if (isString(user)) {
197 this._options.headers['user'] = user;
198 }
199
200 if (isString(password)) {
201 this._options.headers['password'] = password;
202 }
203
204 this._setReadyState(this.OPENED);
205 }
206 }
207
208 public abort() {
209 this._response = null;

Calls 2

_setReadyStateMethod · 0.95
isStringFunction · 0.90

Tested by

no test coverage detected