1 | ;
|
2 |
|
3 | const semver = require('semver');
|
4 |
|
5 | /**
|
6 | * Module of mixed-in functions shared between node and client code
|
7 | */
|
8 | const _require = require('./utils'),
|
9 | isObject = _require.isObject,
|
10 | hasOwn = _require.hasOwn;
|
11 |
|
12 | /**
|
13 | * Expose `RequestBase`.
|
14 | */
|
15 |
|
16 | module.exports = RequestBase;
|
17 |
|
18 | /**
|
19 | * Initialize a new `RequestBase`.
|
20 | *
|
21 | * @api public
|
22 | */
|
23 |
|
24 | function RequestBase() {}
|
25 |
|
26 | /**
|
27 | * Clear previous timeout.
|
28 | *
|
29 | * @return {Request} for chaining
|
30 | * @api public
|
31 | */
|
32 |
|
33 | RequestBase.prototype.clearTimeout = function () {
|
34 | clearTimeout(this._timer);
|
35 | clearTimeout(this._responseTimeoutTimer);
|
36 | clearTimeout(this._uploadTimeoutTimer);
|
37 | delete this._timer;
|
38 | delete this._responseTimeoutTimer;
|
39 | delete this._uploadTimeoutTimer;
|
40 | return this;
|
41 | };
|
42 |
|
43 | /**
|
44 | * Override default response body parser
|
45 | *
|
46 | * This function will be called to convert incoming data into request.body
|
47 | *
|
48 | * @param {Function}
|
49 | * @api public
|
50 | */
|
51 |
|
52 | RequestBase.prototype.parse = function (fn) {
|
53 | this._parser = fn;
|
54 | return this;
|
55 | };
|
56 |
|
57 | /**
|
58 | * Set format of binary response body.
|
59 | * In browser valid formats are 'blob' and 'arraybuffer',
|
60 | * which return Blob and ArrayBuffer, respectively.
|
61 | *
|
62 | * In Node all values result in Buffer.
|
63 | *
|
64 | * Examples:
|
65 | *
|
66 | * req.get('/')
|
67 | * .responseType('blob')
|
68 | * .end(callback);
|
69 | *
|
70 | * @param {String} val
|
71 | * @return {Request} for chaining
|
72 | * @api public
|
73 | */
|
74 |
|
75 | RequestBase.prototype.responseType = function (value) {
|
76 | this._responseType = value;
|
77 | return this;
|
78 | };
|
79 |
|
80 | /**
|
81 | * Override default request body serializer
|
82 | *
|
83 | * This function will be called to convert data set via .send or .attach into payload to send
|
84 | *
|
85 | * @param {Function}
|
86 | * @api public
|
87 | */
|
88 |
|
89 | RequestBase.prototype.serialize = function (fn) {
|
90 | this._serializer = fn;
|
91 | return this;
|
92 | };
|
93 |
|
94 | /**
|
95 | * Set timeouts.
|
96 | *
|
97 | * - response timeout is time between sending request and receiving the first byte of the response. Includes DNS and connection time.
|
98 | * - deadline is the time from start of the request to receiving response body in full. If the deadline is too short large files may not load at all on slow connections.
|
99 | * - upload is the time since last bit of data was sent or received. This timeout works only if deadline timeout is off
|
100 | *
|
101 | * Value of 0 or false means no timeout.
|
102 | *
|
103 | * @param {Number|Object} ms or {response, deadline}
|
104 | * @return {Request} for chaining
|
105 | * @api public
|
106 | */
|
107 |
|
108 | RequestBase.prototype.timeout = function (options) {
|
109 | if (!options || typeof options !== 'object') {
|
110 | this._timeout = options;
|
111 | this._responseTimeout = 0;
|
112 | this._uploadTimeout = 0;
|
113 | return this;
|
114 | }
|
115 | for (const option in options) {
|
116 | if (hasOwn(options, option)) {
|
117 | switch (option) {
|
118 | case 'deadline':
|
119 | {
|
120 | this._timeout = options.deadline;
|
121 | break;
|
122 | }
|
123 | case 'response':
|
124 | {
|
125 | this._responseTimeout = options.response;
|
126 | break;
|
127 | }
|
128 | case 'upload':
|
129 | {
|
130 | this._uploadTimeout = options.upload;
|
131 | break;
|
132 | }
|
133 | default:
|
134 | {
|
135 | console.warn('Unknown timeout option', option);
|
136 | }
|
137 | }
|
138 | }
|
139 | }
|
140 | return this;
|
141 | };
|
142 |
|
143 | /**
|
144 | * Set number of retry attempts on error.
|
145 | *
|
146 | * Failed requests will be retried 'count' times if timeout or err.code >= 500.
|
147 | *
|
148 | * @param {Number} count
|
149 | * @param {Function} [fn]
|
150 | * @return {Request} for chaining
|
151 | * @api public
|
152 | */
|
153 |
|
154 | RequestBase.prototype.retry = function (count, fn) {
|
155 | // Default to 1 if no count passed or true
|
156 | if (arguments.length === 0 || count === true) count = 1;
|
157 | if (count <= 0) count = 0;
|
158 | this._maxRetries = count;
|
159 | this._retries = 0;
|
160 | this._retryCallback = fn;
|
161 | return this;
|
162 | };
|
163 |
|
164 | //
|
165 | // NOTE: we do not include ESOCKETTIMEDOUT because that is from `request` package
|
166 | // <https://github.com/sindresorhus/got/pull/537>
|
167 | //
|
168 | // NOTE: we do not include EADDRINFO because it was removed from libuv in 2014
|
169 | // <https://github.com/libuv/libuv/commit/02e1ebd40b807be5af46343ea873331b2ee4e9c1>
|
170 | // <https://github.com/request/request/search?q=ESOCKETTIMEDOUT&unscoped_q=ESOCKETTIMEDOUT>
|
171 | //
|
172 | //
|
173 | // TODO: expose these as configurable defaults
|
174 | //
|
175 | const ERROR_CODES = new Set(['ETIMEDOUT', 'ECONNRESET', 'EADDRINUSE', 'ECONNREFUSED', 'EPIPE', 'ENOTFOUND', 'ENETUNREACH', 'EAI_AGAIN']);
|
176 | const STATUS_CODES = new Set([408, 413, 429, 500, 502, 503, 504, 521, 522, 524]);
|
177 |
|
178 | // TODO: we would need to make this easily configurable before adding it in (e.g. some might want to add POST)
|
179 | // const METHODS = new Set(['GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE']);
|
180 |
|
181 | /**
|
182 | * Determine if a request should be retried.
|
183 | * (Inspired by https://github.com/sindresorhus/got#retry)
|
184 | *
|
185 | * @param {Error} err an error
|
186 | * @param {Response} [res] response
|
187 | * @returns {Boolean} if segment should be retried
|
188 | */
|
189 | RequestBase.prototype._shouldRetry = function (error, res) {
|
190 | if (!this._maxRetries || this._retries++ >= this._maxRetries) {
|
191 | return false;
|
192 | }
|
193 | if (this._retryCallback) {
|
194 | try {
|
195 | const override = this._retryCallback(error, res);
|
196 | if (override === true) return true;
|
197 | if (override === false) return false;
|
198 | // undefined falls back to defaults
|
199 | } catch (err) {
|
200 | console.error(err);
|
201 | }
|
202 | }
|
203 |
|
204 | // TODO: we would need to make this easily configurable before adding it in (e.g. some might want to add POST)
|
205 | /*
|
206 | if (
|
207 | this.req &&
|
208 | this.req.method &&
|
209 | !METHODS.has(this.req.method.toUpperCase())
|
210 | )
|
211 | return false;
|
212 | */
|
213 | if (res && res.status && STATUS_CODES.has(res.status)) return true;
|
214 | if (error) {
|
215 | if (error.code && ERROR_CODES.has(error.code)) return true;
|
216 | // Superagent timeout
|
217 | if (error.timeout && error.code === 'ECONNABORTED') return true;
|
218 | if (error.crossDomain) return true;
|
219 | }
|
220 | return false;
|
221 | };
|
222 |
|
223 | /**
|
224 | * Retry request
|
225 | *
|
226 | * @return {Request} for chaining
|
227 | * @api private
|
228 | */
|
229 |
|
230 | RequestBase.prototype._retry = function () {
|
231 | this.clearTimeout();
|
232 |
|
233 | // node
|
234 | if (this.req) {
|
235 | this.req = null;
|
236 | this.req = this.request();
|
237 | }
|
238 | this._aborted = false;
|
239 | this.timedout = false;
|
240 | this.timedoutError = null;
|
241 | return this._end();
|
242 | };
|
243 |
|
244 | /**
|
245 | * Promise support
|
246 | *
|
247 | * @param {Function} resolve
|
248 | * @param {Function} [reject]
|
249 | * @return {Request}
|
250 | */
|
251 |
|
252 | RequestBase.prototype.then = function (resolve, reject) {
|
253 | if (!this._fullfilledPromise) {
|
254 | const self = this;
|
255 | if (this._endCalled) {
|
256 | console.warn('Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises');
|
257 | }
|
258 | this._fullfilledPromise = new Promise((resolve, reject) => {
|
259 | self.on('abort', () => {
|
260 | if (this._maxRetries && this._maxRetries > this._retries) {
|
261 | return;
|
262 | }
|
263 | if (this.timedout && this.timedoutError) {
|
264 | reject(this.timedoutError);
|
265 | return;
|
266 | }
|
267 | const error = new Error('Aborted');
|
268 | error.code = 'ABORTED';
|
269 | error.status = this.status;
|
270 | error.method = this.method;
|
271 | error.url = this.url;
|
272 | reject(error);
|
273 | });
|
274 | self.end((error, res) => {
|
275 | if (error) reject(error);else resolve(res);
|
276 | });
|
277 | });
|
278 | }
|
279 | return this._fullfilledPromise.then(resolve, reject);
|
280 | };
|
281 | RequestBase.prototype.catch = function (callback) {
|
282 | return this.then(undefined, callback);
|
283 | };
|
284 |
|
285 | /**
|
286 | * Allow for extension
|
287 | */
|
288 |
|
289 | RequestBase.prototype.use = function (fn) {
|
290 | fn(this);
|
291 | return this;
|
292 | };
|
293 | RequestBase.prototype.ok = function (callback) {
|
294 | if (typeof callback !== 'function') throw new Error('Callback required');
|
295 | this._okCallback = callback;
|
296 | return this;
|
297 | };
|
298 | RequestBase.prototype._isResponseOK = function (res) {
|
299 | if (!res) {
|
300 | return false;
|
301 | }
|
302 | if (this._okCallback) {
|
303 | return this._okCallback(res);
|
304 | }
|
305 | return res.status >= 200 && res.status < 300;
|
306 | };
|
307 |
|
308 | /**
|
309 | * Get request header `field`.
|
310 | * Case-insensitive.
|
311 | *
|
312 | * @param {String} field
|
313 | * @return {String}
|
314 | * @api public
|
315 | */
|
316 |
|
317 | RequestBase.prototype.get = function (field) {
|
318 | return this._header[field.toLowerCase()];
|
319 | };
|
320 |
|
321 | /**
|
322 | * Get case-insensitive header `field` value.
|
323 | * This is a deprecated internal API. Use `.get(field)` instead.
|
324 | *
|
325 | * (getHeader is no longer used internally by the superagent code base)
|
326 | *
|
327 | * @param {String} field
|
328 | * @return {String}
|
329 | * @api private
|
330 | * @deprecated
|
331 | */
|
332 |
|
333 | RequestBase.prototype.getHeader = RequestBase.prototype.get;
|
334 |
|
335 | /**
|
336 | * Set header `field` to `val`, or multiple fields with one object.
|
337 | * Case-insensitive.
|
338 | *
|
339 | * Examples:
|
340 | *
|
341 | * req.get('/')
|
342 | * .set('Accept', 'application/json')
|
343 | * .set('X-API-Key', 'foobar')
|
344 | * .end(callback);
|
345 | *
|
346 | * req.get('/')
|
347 | * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })
|
348 | * .end(callback);
|
349 | *
|
350 | * @param {String|Object} field
|
351 | * @param {String} val
|
352 | * @return {Request} for chaining
|
353 | * @api public
|
354 | */
|
355 |
|
356 | RequestBase.prototype.set = function (field, value) {
|
357 | if (isObject(field)) {
|
358 | for (const key in field) {
|
359 | if (hasOwn(field, key)) this.set(key, field[key]);
|
360 | }
|
361 | return this;
|
362 | }
|
363 | this._header[field.toLowerCase()] = value;
|
364 | this.header[field] = value;
|
365 | return this;
|
366 | };
|
367 |
|
368 | /**
|
369 | * Remove header `field`.
|
370 | * Case-insensitive.
|
371 | *
|
372 | * Example:
|
373 | *
|
374 | * req.get('/')
|
375 | * .unset('User-Agent')
|
376 | * .end(callback);
|
377 | *
|
378 | * @param {String} field field name
|
379 | */
|
380 | RequestBase.prototype.unset = function (field) {
|
381 | delete this._header[field.toLowerCase()];
|
382 | delete this.header[field];
|
383 | return this;
|
384 | };
|
385 |
|
386 | /**
|
387 | * Write the field `name` and `val`, or multiple fields with one object
|
388 | * for "multipart/form-data" request bodies.
|
389 | *
|
390 | * ``` js
|
391 | * request.post('/upload')
|
392 | * .field('foo', 'bar')
|
393 | * .end(callback);
|
394 | *
|
395 | * request.post('/upload')
|
396 | * .field({ foo: 'bar', baz: 'qux' })
|
397 | * .end(callback);
|
398 | * ```
|
399 | *
|
400 | * @param {String|Object} name name of field
|
401 | * @param {String|Blob|File|Buffer|fs.ReadStream} val value of field
|
402 | * @param {String} options extra options, e.g. 'blob'
|
403 | * @return {Request} for chaining
|
404 | * @api public
|
405 | */
|
406 | RequestBase.prototype.field = function (name, value, options) {
|
407 | // name should be either a string or an object.
|
408 | if (name === null || undefined === name) {
|
409 | throw new Error('.field(name, val) name can not be empty');
|
410 | }
|
411 | if (this._data) {
|
412 | throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");
|
413 | }
|
414 | if (isObject(name)) {
|
415 | for (const key in name) {
|
416 | if (hasOwn(name, key)) this.field(key, name[key]);
|
417 | }
|
418 | return this;
|
419 | }
|
420 | if (Array.isArray(value)) {
|
421 | for (const i in value) {
|
422 | if (hasOwn(value, i)) this.field(name, value[i]);
|
423 | }
|
424 | return this;
|
425 | }
|
426 |
|
427 | // val should be defined now
|
428 | if (value === null || undefined === value) {
|
429 | throw new Error('.field(name, val) val can not be empty');
|
430 | }
|
431 | if (typeof value === 'boolean') {
|
432 | value = String(value);
|
433 | }
|
434 |
|
435 | // fix https://github.com/ladjs/superagent/issues/1680
|
436 | if (options) this._getFormData().append(name, value, options);else this._getFormData().append(name, value);
|
437 | return this;
|
438 | };
|
439 |
|
440 | /**
|
441 | * Abort the request, and clear potential timeout.
|
442 | *
|
443 | * @return {Request} request
|
444 | * @api public
|
445 | */
|
446 | RequestBase.prototype.abort = function () {
|
447 | if (this._aborted) {
|
448 | return this;
|
449 | }
|
450 | this._aborted = true;
|
451 | if (this.xhr) this.xhr.abort(); // browser
|
452 | if (this.req) {
|
453 | // Node v13 has major differences in `abort()`
|
454 | // https://github.com/nodejs/node/blob/v12.x/lib/internal/streams/end-of-stream.js
|
455 | // https://github.com/nodejs/node/blob/v13.x/lib/internal/streams/end-of-stream.js
|
456 | // https://github.com/nodejs/node/blob/v14.x/lib/internal/streams/end-of-stream.js
|
457 | // (if you run a diff across these you will see the differences)
|
458 | //
|
459 | // References:
|
460 | // <https://github.com/nodejs/node/issues/31630>
|
461 | // <https://github.com/ladjs/superagent/pull/1084/commits/dc18679a7c5ccfc6046d882015e5126888973bc8>
|
462 | //
|
463 | // Thanks to @shadowgate15 and @niftylettuce
|
464 | if (semver.gte(process.version, 'v13.0.0') && semver.lt(process.version, 'v14.0.0')) {
|
465 | // Note that the reason this doesn't work is because in v13 as compared to v14
|
466 | // there is no `callback = nop` set in end-of-stream.js above
|
467 | throw new Error('Superagent does not work in v13 properly with abort() due to Node.js core changes');
|
468 | }
|
469 | this.req.abort(); // node
|
470 | }
|
471 |
|
472 | this.clearTimeout();
|
473 | this.emit('abort');
|
474 | return this;
|
475 | };
|
476 | RequestBase.prototype._auth = function (user, pass, options, base64Encoder) {
|
477 | switch (options.type) {
|
478 | case 'basic':
|
479 | {
|
480 | this.set('Authorization', `Basic ${base64Encoder(`${user}:${pass}`)}`);
|
481 | break;
|
482 | }
|
483 | case 'auto':
|
484 | {
|
485 | this.username = user;
|
486 | this.password = pass;
|
487 | break;
|
488 | }
|
489 | case 'bearer':
|
490 | {
|
491 | // usage would be .auth(accessToken, { type: 'bearer' })
|
492 | this.set('Authorization', `Bearer ${user}`);
|
493 | break;
|
494 | }
|
495 | default:
|
496 | {
|
497 | break;
|
498 | }
|
499 | }
|
500 | return this;
|
501 | };
|
502 |
|
503 | /**
|
504 | * Enable transmission of cookies with x-domain requests.
|
505 | *
|
506 | * Note that for this to work the origin must not be
|
507 | * using "Access-Control-Allow-Origin" with a wildcard,
|
508 | * and also must set "Access-Control-Allow-Credentials"
|
509 | * to "true".
|
510 | * @param {Boolean} [on=true] - Set 'withCredentials' state
|
511 | * @return {Request} for chaining
|
512 | * @api public
|
513 | */
|
514 |
|
515 | RequestBase.prototype.withCredentials = function (on) {
|
516 | // This is browser-only functionality. Node side is no-op.
|
517 | if (on === undefined) on = true;
|
518 | this._withCredentials = on;
|
519 | return this;
|
520 | };
|
521 |
|
522 | /**
|
523 | * Set the max redirects to `n`. Does nothing in browser XHR implementation.
|
524 | *
|
525 | * @param {Number} n
|
526 | * @return {Request} for chaining
|
527 | * @api public
|
528 | */
|
529 |
|
530 | RequestBase.prototype.redirects = function (n) {
|
531 | this._maxRedirects = n;
|
532 | return this;
|
533 | };
|
534 |
|
535 | /**
|
536 | * Maximum size of buffered response body, in bytes. Counts uncompressed size.
|
537 | * Default 200MB.
|
538 | *
|
539 | * @param {Number} n number of bytes
|
540 | * @return {Request} for chaining
|
541 | */
|
542 | RequestBase.prototype.maxResponseSize = function (n) {
|
543 | if (typeof n !== 'number') {
|
544 | throw new TypeError('Invalid argument');
|
545 | }
|
546 | this._maxResponseSize = n;
|
547 | return this;
|
548 | };
|
549 |
|
550 | /**
|
551 | * Convert to a plain javascript object (not JSON string) of scalar properties.
|
552 | * Note as this method is designed to return a useful non-this value,
|
553 | * it cannot be chained.
|
554 | *
|
555 | * @return {Object} describing method, url, and data of this request
|
556 | * @api public
|
557 | */
|
558 |
|
559 | RequestBase.prototype.toJSON = function () {
|
560 | return {
|
561 | method: this.method,
|
562 | url: this.url,
|
563 | data: this._data,
|
564 | headers: this._header
|
565 | };
|
566 | };
|
567 |
|
568 | /**
|
569 | * Send `data` as the request body, defaulting the `.type()` to "json" when
|
570 | * an object is given.
|
571 | *
|
572 | * Examples:
|
573 | *
|
574 | * // manual json
|
575 | * request.post('/user')
|
576 | * .type('json')
|
577 | * .send('{"name":"tj"}')
|
578 | * .end(callback)
|
579 | *
|
580 | * // auto json
|
581 | * request.post('/user')
|
582 | * .send({ name: 'tj' })
|
583 | * .end(callback)
|
584 | *
|
585 | * // manual x-www-form-urlencoded
|
586 | * request.post('/user')
|
587 | * .type('form')
|
588 | * .send('name=tj')
|
589 | * .end(callback)
|
590 | *
|
591 | * // auto x-www-form-urlencoded
|
592 | * request.post('/user')
|
593 | * .type('form')
|
594 | * .send({ name: 'tj' })
|
595 | * .end(callback)
|
596 | *
|
597 | * // defaults to x-www-form-urlencoded
|
598 | * request.post('/user')
|
599 | * .send('name=tobi')
|
600 | * .send('species=ferret')
|
601 | * .end(callback)
|
602 | *
|
603 | * @param {String|Object} data
|
604 | * @return {Request} for chaining
|
605 | * @api public
|
606 | */
|
607 |
|
608 | // eslint-disable-next-line complexity
|
609 | RequestBase.prototype.send = function (data) {
|
610 | const isObject_ = isObject(data);
|
611 | let type = this._header['content-type'];
|
612 | if (this._formData) {
|
613 | throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");
|
614 | }
|
615 | if (isObject_ && !this._data) {
|
616 | if (Array.isArray(data)) {
|
617 | this._data = [];
|
618 | } else if (!this._isHost(data)) {
|
619 | this._data = {};
|
620 | }
|
621 | } else if (data && this._data && this._isHost(this._data)) {
|
622 | throw new Error("Can't merge these send calls");
|
623 | }
|
624 |
|
625 | // merge
|
626 | if (isObject_ && isObject(this._data)) {
|
627 | for (const key in data) {
|
628 | if (typeof data[key] === 'bigint') throw new Error('Cannot serialize BigInt value to json');
|
629 | if (hasOwn(data, key)) this._data[key] = data[key];
|
630 | }
|
631 | } else if (typeof data === 'bigint') throw new Error('Cannot send value of type BigInt');else if (typeof data === 'string') {
|
632 | // default to x-www-form-urlencoded
|
633 | if (!type) this.type('form');
|
634 | type = this._header['content-type'];
|
635 | if (type) type = type.toLowerCase().trim();
|
636 | if (type === 'application/x-www-form-urlencoded') {
|
637 | this._data = this._data ? `${this._data}&${data}` : data;
|
638 | } else {
|
639 | this._data = (this._data || '') + data;
|
640 | }
|
641 | } else {
|
642 | this._data = data;
|
643 | }
|
644 | if (!isObject_ || this._isHost(data)) {
|
645 | return this;
|
646 | }
|
647 |
|
648 | // default to json
|
649 | if (!type) this.type('json');
|
650 | return this;
|
651 | };
|
652 |
|
653 | /**
|
654 | * Sort `querystring` by the sort function
|
655 | *
|
656 | *
|
657 | * Examples:
|
658 | *
|
659 | * // default order
|
660 | * request.get('/user')
|
661 | * .query('name=Nick')
|
662 | * .query('search=Manny')
|
663 | * .sortQuery()
|
664 | * .end(callback)
|
665 | *
|
666 | * // customized sort function
|
667 | * request.get('/user')
|
668 | * .query('name=Nick')
|
669 | * .query('search=Manny')
|
670 | * .sortQuery(function(a, b){
|
671 | * return a.length - b.length;
|
672 | * })
|
673 | * .end(callback)
|
674 | *
|
675 | *
|
676 | * @param {Function} sort
|
677 | * @return {Request} for chaining
|
678 | * @api public
|
679 | */
|
680 |
|
681 | RequestBase.prototype.sortQuery = function (sort) {
|
682 | // _sort default to true but otherwise can be a function or boolean
|
683 | this._sort = sort === undefined ? true : sort;
|
684 | return this;
|
685 | };
|
686 |
|
687 | /**
|
688 | * Compose querystring to append to req.url
|
689 | *
|
690 | * @api private
|
691 | */
|
692 | RequestBase.prototype._finalizeQueryString = function () {
|
693 | const query = this._query.join('&');
|
694 | if (query) {
|
695 | this.url += (this.url.includes('?') ? '&' : '?') + query;
|
696 | }
|
697 | this._query.length = 0; // Makes the call idempotent
|
698 |
|
699 | if (this._sort) {
|
700 | const index = this.url.indexOf('?');
|
701 | if (index >= 0) {
|
702 | const queryArray = this.url.slice(index + 1).split('&');
|
703 | if (typeof this._sort === 'function') {
|
704 | queryArray.sort(this._sort);
|
705 | } else {
|
706 | queryArray.sort();
|
707 | }
|
708 | this.url = this.url.slice(0, index) + '?' + queryArray.join('&');
|
709 | }
|
710 | }
|
711 | };
|
712 |
|
713 | // For backwards compat only
|
714 | RequestBase.prototype._appendQueryString = () => {
|
715 | console.warn('Unsupported');
|
716 | };
|
717 |
|
718 | /**
|
719 | * Invoke callback with timeout error.
|
720 | *
|
721 | * @api private
|
722 | */
|
723 |
|
724 | RequestBase.prototype._timeoutError = function (reason, timeout, errno) {
|
725 | if (this._aborted) {
|
726 | return;
|
727 | }
|
728 | const error = new Error(`${reason + timeout}ms exceeded`);
|
729 | error.timeout = timeout;
|
730 | error.code = 'ECONNABORTED';
|
731 | error.errno = errno;
|
732 | this.timedout = true;
|
733 | this.timedoutError = error;
|
734 | this.abort();
|
735 | this.callback(error);
|
736 | };
|
737 | RequestBase.prototype._setTimeouts = function () {
|
738 | const self = this;
|
739 |
|
740 | // deadline
|
741 | if (this._timeout && !this._timer) {
|
742 | this._timer = setTimeout(() => {
|
743 | self._timeoutError('Timeout of ', self._timeout, 'ETIME');
|
744 | }, this._timeout);
|
745 | }
|
746 |
|
747 | // response timeout
|
748 | if (this._responseTimeout && !this._responseTimeoutTimer) {
|
749 | this._responseTimeoutTimer = setTimeout(() => {
|
750 | self._timeoutError('Response timeout of ', self._responseTimeout, 'ETIMEDOUT');
|
751 | }, this._responseTimeout);
|
752 | }
|
753 | };
|
754 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJzZW12ZXIiLCJyZXF1aXJlIiwiX3JlcXVpcmUiLCJpc09iamVjdCIsImhhc093biIsIm1vZHVsZSIsImV4cG9ydHMiLCJSZXF1ZXN0QmFzZSIsInByb3RvdHlwZSIsImNsZWFyVGltZW91dCIsIl90aW1l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