1 | ;
|
2 |
|
3 | function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4 | function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
5 | function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
6 | function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7 | function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
8 | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
9 | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
10 | /**
|
11 | * Module dependencies.
|
12 | */
|
13 |
|
14 | // eslint-disable-next-line node/no-deprecated-api
|
15 | const _require = require('node:url'),
|
16 | parse = _require.parse,
|
17 | format = _require.format,
|
18 | resolve = _require.resolve;
|
19 | const Stream = require('node:stream');
|
20 | const https = require('node:https');
|
21 | const http = require('node:http');
|
22 | const fs = require('node:fs');
|
23 | const zlib = require('node:zlib');
|
24 | const util = require('node:util');
|
25 | const qs = require('qs');
|
26 | const mime = require('mime');
|
27 | let methods = require('methods');
|
28 | const FormData = require('form-data');
|
29 | const formidable = require('formidable');
|
30 | const debug = require('debug')('superagent');
|
31 | const CookieJar = require('cookiejar');
|
32 | const semverGte = require('semver/functions/gte');
|
33 | const safeStringify = require('fast-safe-stringify');
|
34 | const utils = require('../utils');
|
35 | const RequestBase = require('../request-base');
|
36 | const _require2 = require('./unzip'),
|
37 | unzip = _require2.unzip;
|
38 | const Response = require('./response');
|
39 | const mixin = utils.mixin,
|
40 | hasOwn = utils.hasOwn;
|
41 | let http2;
|
42 | if (semverGte(process.version, 'v10.10.0')) http2 = require('./http2wrapper');
|
43 | function request(method, url) {
|
44 | // callback
|
45 | if (typeof url === 'function') {
|
46 | return new exports.Request('GET', method).end(url);
|
47 | }
|
48 |
|
49 | // url first
|
50 | if (arguments.length === 1) {
|
51 | return new exports.Request('GET', method);
|
52 | }
|
53 | return new exports.Request(method, url);
|
54 | }
|
55 | module.exports = request;
|
56 | exports = module.exports;
|
57 |
|
58 | /**
|
59 | * Expose `Request`.
|
60 | */
|
61 |
|
62 | exports.Request = Request;
|
63 |
|
64 | /**
|
65 | * Expose the agent function
|
66 | */
|
67 |
|
68 | exports.agent = require('./agent');
|
69 |
|
70 | /**
|
71 | * Noop.
|
72 | */
|
73 |
|
74 | function noop() {}
|
75 |
|
76 | /**
|
77 | * Expose `Response`.
|
78 | */
|
79 |
|
80 | exports.Response = Response;
|
81 |
|
82 | /**
|
83 | * Define "form" mime type.
|
84 | */
|
85 |
|
86 | mime.define({
|
87 | 'application/x-www-form-urlencoded': ['form', 'urlencoded', 'form-data']
|
88 | }, true);
|
89 |
|
90 | /**
|
91 | * Protocol map.
|
92 | */
|
93 |
|
94 | exports.protocols = {
|
95 | 'http:': http,
|
96 | 'https:': https,
|
97 | 'http2:': http2
|
98 | };
|
99 |
|
100 | /**
|
101 | * Default serialization map.
|
102 | *
|
103 | * superagent.serialize['application/xml'] = function(obj){
|
104 | * return 'generated xml here';
|
105 | * };
|
106 | *
|
107 | */
|
108 |
|
109 | exports.serialize = {
|
110 | 'application/x-www-form-urlencoded': qs.stringify,
|
111 | 'application/json': safeStringify
|
112 | };
|
113 |
|
114 | /**
|
115 | * Default parsers.
|
116 | *
|
117 | * superagent.parse['application/xml'] = function(res, fn){
|
118 | * fn(null, res);
|
119 | * };
|
120 | *
|
121 | */
|
122 |
|
123 | exports.parse = require('./parsers');
|
124 |
|
125 | /**
|
126 | * Default buffering map. Can be used to set certain
|
127 | * response types to buffer/not buffer.
|
128 | *
|
129 | * superagent.buffer['application/xml'] = true;
|
130 | */
|
131 | exports.buffer = {};
|
132 |
|
133 | /**
|
134 | * Initialize internal header tracking properties on a request instance.
|
135 | *
|
136 | * @param {Object} req the instance
|
137 | * @api private
|
138 | */
|
139 | function _initHeaders(request_) {
|
140 | request_._header = {
|
141 | // coerces header names to lowercase
|
142 | };
|
143 | request_.header = {
|
144 | // preserves header name case
|
145 | };
|
146 | }
|
147 |
|
148 | /**
|
149 | * Initialize a new `Request` with the given `method` and `url`.
|
150 | *
|
151 | * @param {String} method
|
152 | * @param {String|Object} url
|
153 | * @api public
|
154 | */
|
155 |
|
156 | function Request(method, url) {
|
157 | Stream.call(this);
|
158 | if (typeof url !== 'string') url = format(url);
|
159 | this._enableHttp2 = Boolean(process.env.HTTP2_TEST); // internal only
|
160 | this._agent = false;
|
161 | this._formData = null;
|
162 | this.method = method;
|
163 | this.url = url;
|
164 | _initHeaders(this);
|
165 | this.writable = true;
|
166 | this._redirects = 0;
|
167 | this.redirects(method === 'HEAD' ? 0 : 5);
|
168 | this.cookies = '';
|
169 | this.qs = {};
|
170 | this._query = [];
|
171 | this.qsRaw = this._query; // Unused, for backwards compatibility only
|
172 | this._redirectList = [];
|
173 | this._streamRequest = false;
|
174 | this._lookup = undefined;
|
175 | this.once('end', this.clearTimeout.bind(this));
|
176 | }
|
177 |
|
178 | /**
|
179 | * Inherit from `Stream` (which inherits from `EventEmitter`).
|
180 | * Mixin `RequestBase`.
|
181 | */
|
182 | util.inherits(Request, Stream);
|
183 | mixin(Request.prototype, RequestBase.prototype);
|
184 |
|
185 | /**
|
186 | * Enable or Disable http2.
|
187 | *
|
188 | * Enable http2.
|
189 | *
|
190 | * ``` js
|
191 | * request.get('http://localhost/')
|
192 | * .http2()
|
193 | * .end(callback);
|
194 | *
|
195 | * request.get('http://localhost/')
|
196 | * .http2(true)
|
197 | * .end(callback);
|
198 | * ```
|
199 | *
|
200 | * Disable http2.
|
201 | *
|
202 | * ``` js
|
203 | * request = request.http2();
|
204 | * request.get('http://localhost/')
|
205 | * .http2(false)
|
206 | * .end(callback);
|
207 | * ```
|
208 | *
|
209 | * @param {Boolean} enable
|
210 | * @return {Request} for chaining
|
211 | * @api public
|
212 | */
|
213 |
|
214 | Request.prototype.http2 = function (bool) {
|
215 | if (exports.protocols['http2:'] === undefined) {
|
216 | throw new Error('superagent: this version of Node.js does not support http2');
|
217 | }
|
218 | this._enableHttp2 = bool === undefined ? true : bool;
|
219 | return this;
|
220 | };
|
221 |
|
222 | /**
|
223 | * Queue the given `file` as an attachment to the specified `field`,
|
224 | * with optional `options` (or filename).
|
225 | *
|
226 | * ``` js
|
227 | * request.post('http://localhost/upload')
|
228 | * .attach('field', Buffer.from('<b>Hello world</b>'), 'hello.html')
|
229 | * .end(callback);
|
230 | * ```
|
231 | *
|
232 | * A filename may also be used:
|
233 | *
|
234 | * ``` js
|
235 | * request.post('http://localhost/upload')
|
236 | * .attach('files', 'image.jpg')
|
237 | * .end(callback);
|
238 | * ```
|
239 | *
|
240 | * @param {String} field
|
241 | * @param {String|fs.ReadStream|Buffer} file
|
242 | * @param {String|Object} options
|
243 | * @return {Request} for chaining
|
244 | * @api public
|
245 | */
|
246 |
|
247 | Request.prototype.attach = function (field, file, options) {
|
248 | if (file) {
|
249 | if (this._data) {
|
250 | throw new Error("superagent can't mix .send() and .attach()");
|
251 | }
|
252 | let o = options || {};
|
253 | if (typeof options === 'string') {
|
254 | o = {
|
255 | filename: options
|
256 | };
|
257 | }
|
258 | if (typeof file === 'string') {
|
259 | if (!o.filename) o.filename = file;
|
260 | debug('creating `fs.ReadStream` instance for file: %s', file);
|
261 | file = fs.createReadStream(file);
|
262 | file.on('error', error => {
|
263 | const formData = this._getFormData();
|
264 | formData.emit('error', error);
|
265 | });
|
266 | } else if (!o.filename && file.path) {
|
267 | o.filename = file.path;
|
268 | }
|
269 | this._getFormData().append(field, file, o);
|
270 | }
|
271 | return this;
|
272 | };
|
273 | Request.prototype._getFormData = function () {
|
274 | if (!this._formData) {
|
275 | this._formData = new FormData();
|
276 | this._formData.on('error', error => {
|
277 | debug('FormData error', error);
|
278 | if (this.called) {
|
279 | // The request has already finished and the callback was called.
|
280 | // Silently ignore the error.
|
281 | return;
|
282 | }
|
283 | this.callback(error);
|
284 | this.abort();
|
285 | });
|
286 | }
|
287 | return this._formData;
|
288 | };
|
289 |
|
290 | /**
|
291 | * Gets/sets the `Agent` to use for this HTTP request. The default (if this
|
292 | * function is not called) is to opt out of connection pooling (`agent: false`).
|
293 | *
|
294 | * @param {http.Agent} agent
|
295 | * @return {http.Agent}
|
296 | * @api public
|
297 | */
|
298 |
|
299 | Request.prototype.agent = function (agent) {
|
300 | if (arguments.length === 0) return this._agent;
|
301 | this._agent = agent;
|
302 | return this;
|
303 | };
|
304 |
|
305 | /**
|
306 | * Gets/sets the `lookup` function to use custom DNS resolver.
|
307 | *
|
308 | * @param {Function} lookup
|
309 | * @return {Function}
|
310 | * @api public
|
311 | */
|
312 |
|
313 | Request.prototype.lookup = function (lookup) {
|
314 | if (arguments.length === 0) return this._lookup;
|
315 | this._lookup = lookup;
|
316 | return this;
|
317 | };
|
318 |
|
319 | /**
|
320 | * Set _Content-Type_ response header passed through `mime.getType()`.
|
321 | *
|
322 | * Examples:
|
323 | *
|
324 | * request.post('/')
|
325 | * .type('xml')
|
326 | * .send(xmlstring)
|
327 | * .end(callback);
|
328 | *
|
329 | * request.post('/')
|
330 | * .type('json')
|
331 | * .send(jsonstring)
|
332 | * .end(callback);
|
333 | *
|
334 | * request.post('/')
|
335 | * .type('application/json')
|
336 | * .send(jsonstring)
|
337 | * .end(callback);
|
338 | *
|
339 | * @param {String} type
|
340 | * @return {Request} for chaining
|
341 | * @api public
|
342 | */
|
343 |
|
344 | Request.prototype.type = function (type) {
|
345 | return this.set('Content-Type', type.includes('/') ? type : mime.getType(type));
|
346 | };
|
347 |
|
348 | /**
|
349 | * Set _Accept_ response header passed through `mime.getType()`.
|
350 | *
|
351 | * Examples:
|
352 | *
|
353 | * superagent.types.json = 'application/json';
|
354 | *
|
355 | * request.get('/agent')
|
356 | * .accept('json')
|
357 | * .end(callback);
|
358 | *
|
359 | * request.get('/agent')
|
360 | * .accept('application/json')
|
361 | * .end(callback);
|
362 | *
|
363 | * @param {String} accept
|
364 | * @return {Request} for chaining
|
365 | * @api public
|
366 | */
|
367 |
|
368 | Request.prototype.accept = function (type) {
|
369 | return this.set('Accept', type.includes('/') ? type : mime.getType(type));
|
370 | };
|
371 |
|
372 | /**
|
373 | * Add query-string `val`.
|
374 | *
|
375 | * Examples:
|
376 | *
|
377 | * request.get('/shoes')
|
378 | * .query('size=10')
|
379 | * .query({ color: 'blue' })
|
380 | *
|
381 | * @param {Object|String} val
|
382 | * @return {Request} for chaining
|
383 | * @api public
|
384 | */
|
385 |
|
386 | Request.prototype.query = function (value) {
|
387 | if (typeof value === 'string') {
|
388 | this._query.push(value);
|
389 | } else {
|
390 | Object.assign(this.qs, value);
|
391 | }
|
392 | return this;
|
393 | };
|
394 |
|
395 | /**
|
396 | * Write raw `data` / `encoding` to the socket.
|
397 | *
|
398 | * @param {Buffer|String} data
|
399 | * @param {String} encoding
|
400 | * @return {Boolean}
|
401 | * @api public
|
402 | */
|
403 |
|
404 | Request.prototype.write = function (data, encoding) {
|
405 | const request_ = this.request();
|
406 | if (!this._streamRequest) {
|
407 | this._streamRequest = true;
|
408 | }
|
409 | return request_.write(data, encoding);
|
410 | };
|
411 |
|
412 | /**
|
413 | * Pipe the request body to `stream`.
|
414 | *
|
415 | * @param {Stream} stream
|
416 | * @param {Object} options
|
417 | * @return {Stream}
|
418 | * @api public
|
419 | */
|
420 |
|
421 | Request.prototype.pipe = function (stream, options) {
|
422 | this.piped = true; // HACK...
|
423 | this.buffer(false);
|
424 | this.end();
|
425 | return this._pipeContinue(stream, options);
|
426 | };
|
427 | Request.prototype._pipeContinue = function (stream, options) {
|
428 | this.req.once('response', res => {
|
429 | // redirect
|
430 | if (isRedirect(res.statusCode) && this._redirects++ !== this._maxRedirects) {
|
431 | return this._redirect(res) === this ? this._pipeContinue(stream, options) : undefined;
|
432 | }
|
433 | this.res = res;
|
434 | this._emitResponse();
|
435 | if (this._aborted) return;
|
436 | if (this._shouldUnzip(res)) {
|
437 | const unzipObject = zlib.createUnzip();
|
438 | unzipObject.on('error', error => {
|
439 | if (error && error.code === 'Z_BUF_ERROR') {
|
440 | // unexpected end of file is ignored by browsers and curl
|
441 | stream.emit('end');
|
442 | return;
|
443 | }
|
444 | stream.emit('error', error);
|
445 | });
|
446 | res.pipe(unzipObject).pipe(stream, options);
|
447 | // don't emit 'end' until unzipObject has completed writing all its data.
|
448 | unzipObject.once('end', () => this.emit('end'));
|
449 | } else {
|
450 | res.pipe(stream, options);
|
451 | res.once('end', () => this.emit('end'));
|
452 | }
|
453 | });
|
454 | return stream;
|
455 | };
|
456 |
|
457 | /**
|
458 | * Enable / disable buffering.
|
459 | *
|
460 | * @return {Boolean} [val]
|
461 | * @return {Request} for chaining
|
462 | * @api public
|
463 | */
|
464 |
|
465 | Request.prototype.buffer = function (value) {
|
466 | this._buffer = value !== false;
|
467 | return this;
|
468 | };
|
469 |
|
470 | /**
|
471 | * Redirect to `url
|
472 | *
|
473 | * @param {IncomingMessage} res
|
474 | * @return {Request} for chaining
|
475 | * @api private
|
476 | */
|
477 |
|
478 | Request.prototype._redirect = function (res) {
|
479 | let url = res.headers.location;
|
480 | if (!url) {
|
481 | return this.callback(new Error('No location header for redirect'), res);
|
482 | }
|
483 | debug('redirect %s -> %s', this.url, url);
|
484 |
|
485 | // location
|
486 | url = resolve(this.url, url);
|
487 |
|
488 | // ensure the response is being consumed
|
489 | // this is required for Node v0.10+
|
490 | res.resume();
|
491 | let headers = this.req.getHeaders ? this.req.getHeaders() : this.req._headers;
|
492 | const changesOrigin = parse(url).host !== parse(this.url).host;
|
493 |
|
494 | // implementation of 302 following defacto standard
|
495 | if (res.statusCode === 301 || res.statusCode === 302) {
|
496 | // strip Content-* related fields
|
497 | // in case of POST etc
|
498 | headers = utils.cleanHeader(headers, changesOrigin);
|
499 |
|
500 | // force GET
|
501 | this.method = this.method === 'HEAD' ? 'HEAD' : 'GET';
|
502 |
|
503 | // clear data
|
504 | this._data = null;
|
505 | }
|
506 |
|
507 | // 303 is always GET
|
508 | if (res.statusCode === 303) {
|
509 | // strip Content-* related fields
|
510 | // in case of POST etc
|
511 | headers = utils.cleanHeader(headers, changesOrigin);
|
512 |
|
513 | // force method
|
514 | this.method = 'GET';
|
515 |
|
516 | // clear data
|
517 | this._data = null;
|
518 | }
|
519 |
|
520 | // 307 preserves method
|
521 | // 308 preserves method
|
522 | delete headers.host;
|
523 | delete this.req;
|
524 | delete this._formData;
|
525 |
|
526 | // remove all add header except User-Agent
|
527 | _initHeaders(this);
|
528 |
|
529 | // redirect
|
530 | this.res = res;
|
531 | this._endCalled = false;
|
532 | this.url = url;
|
533 | this.qs = {};
|
534 | this._query.length = 0;
|
535 | this.set(headers);
|
536 | this._emitRedirect();
|
537 | this._redirectList.push(this.url);
|
538 | this.end(this._callback);
|
539 | return this;
|
540 | };
|
541 |
|
542 | /**
|
543 | * Set Authorization field value with `user` and `pass`.
|
544 | *
|
545 | * Examples:
|
546 | *
|
547 | * .auth('tobi', 'learnboost')
|
548 | * .auth('tobi:learnboost')
|
549 | * .auth('tobi')
|
550 | * .auth(accessToken, { type: 'bearer' })
|
551 | *
|
552 | * @param {String} user
|
553 | * @param {String} [pass]
|
554 | * @param {Object} [options] options with authorization type 'basic' or 'bearer' ('basic' is default)
|
555 | * @return {Request} for chaining
|
556 | * @api public
|
557 | */
|
558 |
|
559 | Request.prototype.auth = function (user, pass, options) {
|
560 | if (arguments.length === 1) pass = '';
|
561 | if (typeof pass === 'object' && pass !== null) {
|
562 | // pass is optional and can be replaced with options
|
563 | options = pass;
|
564 | pass = '';
|
565 | }
|
566 | if (!options) {
|
567 | options = {
|
568 | type: 'basic'
|
569 | };
|
570 | }
|
571 | const encoder = string => Buffer.from(string).toString('base64');
|
572 | return this._auth(user, pass, options, encoder);
|
573 | };
|
574 |
|
575 | /**
|
576 | * Set the certificate authority option for https request.
|
577 | *
|
578 | * @param {Buffer | Array} cert
|
579 | * @return {Request} for chaining
|
580 | * @api public
|
581 | */
|
582 |
|
583 | Request.prototype.ca = function (cert) {
|
584 | this._ca = cert;
|
585 | return this;
|
586 | };
|
587 |
|
588 | /**
|
589 | * Set the client certificate key option for https request.
|
590 | *
|
591 | * @param {Buffer | String} cert
|
592 | * @return {Request} for chaining
|
593 | * @api public
|
594 | */
|
595 |
|
596 | Request.prototype.key = function (cert) {
|
597 | this._key = cert;
|
598 | return this;
|
599 | };
|
600 |
|
601 | /**
|
602 | * Set the key, certificate, and CA certs of the client in PFX or PKCS12 format.
|
603 | *
|
604 | * @param {Buffer | String} cert
|
605 | * @return {Request} for chaining
|
606 | * @api public
|
607 | */
|
608 |
|
609 | Request.prototype.pfx = function (cert) {
|
610 | if (typeof cert === 'object' && !Buffer.isBuffer(cert)) {
|
611 | this._pfx = cert.pfx;
|
612 | this._passphrase = cert.passphrase;
|
613 | } else {
|
614 | this._pfx = cert;
|
615 | }
|
616 | return this;
|
617 | };
|
618 |
|
619 | /**
|
620 | * Set the client certificate option for https request.
|
621 | *
|
622 | * @param {Buffer | String} cert
|
623 | * @return {Request} for chaining
|
624 | * @api public
|
625 | */
|
626 |
|
627 | Request.prototype.cert = function (cert) {
|
628 | this._cert = cert;
|
629 | return this;
|
630 | };
|
631 |
|
632 | /**
|
633 | * Do not reject expired or invalid TLS certs.
|
634 | * sets `rejectUnauthorized=true`. Be warned that this allows MITM attacks.
|
635 | *
|
636 | * @return {Request} for chaining
|
637 | * @api public
|
638 | */
|
639 |
|
640 | Request.prototype.disableTLSCerts = function () {
|
641 | this._disableTLSCerts = true;
|
642 | return this;
|
643 | };
|
644 |
|
645 | /**
|
646 | * Return an http[s] request.
|
647 | *
|
648 | * @return {OutgoingMessage}
|
649 | * @api private
|
650 | */
|
651 |
|
652 | // eslint-disable-next-line complexity
|
653 | Request.prototype.request = function () {
|
654 | if (this.req) return this.req;
|
655 | const options = {};
|
656 | try {
|
657 | const query = qs.stringify(this.qs, {
|
658 | indices: false,
|
659 | strictNullHandling: true
|
660 | });
|
661 | if (query) {
|
662 | this.qs = {};
|
663 | this._query.push(query);
|
664 | }
|
665 | this._finalizeQueryString();
|
666 | } catch (err) {
|
667 | return this.emit('error', err);
|
668 | }
|
669 | let url = this.url;
|
670 | const retries = this._retries;
|
671 |
|
672 | // Capture backticks as-is from the final query string built above.
|
673 | // Note: this'll only find backticks entered in req.query(String)
|
674 | // calls, because qs.stringify unconditionally encodes backticks.
|
675 | let queryStringBackticks;
|
676 | if (url.includes('`')) {
|
677 | const queryStartIndex = url.indexOf('?');
|
678 | if (queryStartIndex !== -1) {
|
679 | const queryString = url.slice(queryStartIndex + 1);
|
680 | queryStringBackticks = queryString.match(/`|%60/g);
|
681 | }
|
682 | }
|
683 |
|
684 | // default to http://
|
685 | if (url.indexOf('http') !== 0) url = `http://${url}`;
|
686 | url = parse(url);
|
687 |
|
688 | // See https://github.com/ladjs/superagent/issues/1367
|
689 | if (queryStringBackticks) {
|
690 | let i = 0;
|
691 | url.query = url.query.replaceAll('%60', () => queryStringBackticks[i++]);
|
692 | url.search = `?${url.query}`;
|
693 | url.path = url.pathname + url.search;
|
694 | }
|
695 |
|
696 | // support unix sockets
|
697 | if (/^https?\+unix:/.test(url.protocol) === true) {
|
698 | // get the protocol
|
699 | url.protocol = `${url.protocol.split('+')[0]}:`;
|
700 |
|
701 | // get the socket, path
|
702 | const unixParts = url.path.match(/^([^/]+)(.+)$/);
|
703 | options.socketPath = unixParts[1].replaceAll('%2F', '/');
|
704 | url.path = unixParts[2];
|
705 | }
|
706 |
|
707 | // Override IP address of a hostname
|
708 | if (this._connectOverride) {
|
709 | const _url = url,
|
710 | hostname = _url.hostname;
|
711 | const match = hostname in this._connectOverride ? this._connectOverride[hostname] : this._connectOverride['*'];
|
712 | if (match) {
|
713 | // backup the real host
|
714 | if (!this._header.host) {
|
715 | this.set('host', url.host);
|
716 | }
|
717 | let newHost;
|
718 | let newPort;
|
719 | if (typeof match === 'object') {
|
720 | newHost = match.host;
|
721 | newPort = match.port;
|
722 | } else {
|
723 | newHost = match;
|
724 | newPort = url.port;
|
725 | }
|
726 |
|
727 | // wrap [ipv6]
|
728 | url.host = /:/.test(newHost) ? `[${newHost}]` : newHost;
|
729 | if (newPort) {
|
730 | url.host += `:${newPort}`;
|
731 | url.port = newPort;
|
732 | }
|
733 | url.hostname = newHost;
|
734 | }
|
735 | }
|
736 |
|
737 | // options
|
738 | options.method = this.method;
|
739 | options.port = url.port;
|
740 | options.path = url.path;
|
741 | options.host = url.hostname;
|
742 | options.ca = this._ca;
|
743 | options.key = this._key;
|
744 | options.pfx = this._pfx;
|
745 | options.cert = this._cert;
|
746 | options.passphrase = this._passphrase;
|
747 | options.agent = this._agent;
|
748 | options.lookup = this._lookup;
|
749 | options.rejectUnauthorized = typeof this._disableTLSCerts === 'boolean' ? !this._disableTLSCerts : process.env.NODE_TLS_REJECT_UNAUTHORIZED !== '0';
|
750 |
|
751 | // Allows request.get('https://1.2.3.4/').set('Host', 'example.com')
|
752 | if (this._header.host) {
|
753 | options.servername = this._header.host.replace(/:\d+$/, '');
|
754 | }
|
755 | if (this._trustLocalhost && /^(?:localhost|127\.0\.0\.\d+|(0*:)+:0*1)$/.test(url.hostname)) {
|
756 | options.rejectUnauthorized = false;
|
757 | }
|
758 |
|
759 | // initiate request
|
760 | const module_ = this._enableHttp2 ? exports.protocols['http2:'].setProtocol(url.protocol) : exports.protocols[url.protocol];
|
761 |
|
762 | // request
|
763 | this.req = module_.request(options);
|
764 | const req = this.req;
|
765 |
|
766 | // set tcp no delay
|
767 | req.setNoDelay(true);
|
768 | if (options.method !== 'HEAD') {
|
769 | req.setHeader('Accept-Encoding', 'gzip, deflate');
|
770 | }
|
771 | this.protocol = url.protocol;
|
772 | this.host = url.host;
|
773 |
|
774 | // expose events
|
775 | req.once('drain', () => {
|
776 | this.emit('drain');
|
777 | });
|
778 | req.on('error', error => {
|
779 | // flag abortion here for out timeouts
|
780 | // because node will emit a faux-error "socket hang up"
|
781 | // when request is aborted before a connection is made
|
782 | if (this._aborted) return;
|
783 | // if not the same, we are in the **old** (cancelled) request,
|
784 | // so need to continue (same as for above)
|
785 | if (this._retries !== retries) return;
|
786 | // if we've received a response then we don't want to let
|
787 | // an error in the request blow up the response
|
788 | if (this.response) return;
|
789 | this.callback(error);
|
790 | });
|
791 |
|
792 | // auth
|
793 | if (url.auth) {
|
794 | const auth = url.auth.split(':');
|
795 | this.auth(auth[0], auth[1]);
|
796 | }
|
797 | if (this.username && this.password) {
|
798 | this.auth(this.username, this.password);
|
799 | }
|
800 | for (const key in this.header) {
|
801 | if (hasOwn(this.header, key)) req.setHeader(key, this.header[key]);
|
802 | }
|
803 |
|
804 | // add cookies
|
805 | if (this.cookies) {
|
806 | if (hasOwn(this._header, 'cookie')) {
|
807 | // merge
|
808 | const temporaryJar = new CookieJar.CookieJar();
|
809 | temporaryJar.setCookies(this._header.cookie.split('; '));
|
810 | temporaryJar.setCookies(this.cookies.split('; '));
|
811 | req.setHeader('Cookie', temporaryJar.getCookies(CookieJar.CookieAccessInfo.All).toValueString());
|
812 | } else {
|
813 | req.setHeader('Cookie', this.cookies);
|
814 | }
|
815 | }
|
816 | return req;
|
817 | };
|
818 |
|
819 | /**
|
820 | * Invoke the callback with `err` and `res`
|
821 | * and handle arity check.
|
822 | *
|
823 | * @param {Error} err
|
824 | * @param {Response} res
|
825 | * @api private
|
826 | */
|
827 |
|
828 | Request.prototype.callback = function (error, res) {
|
829 | if (this._shouldRetry(error, res)) {
|
830 | return this._retry();
|
831 | }
|
832 |
|
833 | // Avoid the error which is emitted from 'socket hang up' to cause the fn undefined error on JS runtime.
|
834 | const fn = this._callback || noop;
|
835 | this.clearTimeout();
|
836 | if (this.called) return console.warn('superagent: double callback bug');
|
837 | this.called = true;
|
838 | if (!error) {
|
839 | try {
|
840 | if (!this._isResponseOK(res)) {
|
841 | let message = 'Unsuccessful HTTP response';
|
842 | if (res) {
|
843 | message = http.STATUS_CODES[res.status] || message;
|
844 | }
|
845 | error = new Error(message);
|
846 | error.status = res ? res.status : undefined;
|
847 | }
|
848 | } catch (err) {
|
849 | error = err;
|
850 | error.status = error.status || (res ? res.status : undefined);
|
851 | }
|
852 | }
|
853 |
|
854 | // It's important that the callback is called outside try/catch
|
855 | // to avoid double callback
|
856 | if (!error) {
|
857 | return fn(null, res);
|
858 | }
|
859 | error.response = res;
|
860 | if (this._maxRetries) error.retries = this._retries - 1;
|
861 |
|
862 | // only emit error event if there is a listener
|
863 | // otherwise we assume the callback to `.end()` will get the error
|
864 | if (error && this.listeners('error').length > 0) {
|
865 | this.emit('error', error);
|
866 | }
|
867 | fn(error, res);
|
868 | };
|
869 |
|
870 | /**
|
871 | * Check if `obj` is a host object,
|
872 | *
|
873 | * @param {Object} obj host object
|
874 | * @return {Boolean} is a host object
|
875 | * @api private
|
876 | */
|
877 | Request.prototype._isHost = function (object) {
|
878 | return Buffer.isBuffer(object) || object instanceof Stream || object instanceof FormData;
|
879 | };
|
880 |
|
881 | /**
|
882 | * Initiate request, invoking callback `fn(err, res)`
|
883 | * with an instanceof `Response`.
|
884 | *
|
885 | * @param {Function} fn
|
886 | * @return {Request} for chaining
|
887 | * @api public
|
888 | */
|
889 |
|
890 | Request.prototype._emitResponse = function (body, files) {
|
891 | const response = new Response(this);
|
892 | this.response = response;
|
893 | response.redirects = this._redirectList;
|
894 | if (undefined !== body) {
|
895 | response.body = body;
|
896 | }
|
897 | response.files = files;
|
898 | if (this._endCalled) {
|
899 | response.pipe = function () {
|
900 | throw new Error("end() has already been called, so it's too late to start piping");
|
901 | };
|
902 | }
|
903 | this.emit('response', response);
|
904 | return response;
|
905 | };
|
906 |
|
907 | /**
|
908 | * Emit `redirect` event, passing an instanceof `Response`.
|
909 | *
|
910 | * @api private
|
911 | */
|
912 |
|
913 | Request.prototype._emitRedirect = function () {
|
914 | const response = new Response(this);
|
915 | response.redirects = this._redirectList;
|
916 | this.emit('redirect', response);
|
917 | };
|
918 | Request.prototype.end = function (fn) {
|
919 | this.request();
|
920 | debug('%s %s', this.method, this.url);
|
921 | if (this._endCalled) {
|
922 | throw new Error('.end() was called twice. This is not supported in superagent');
|
923 | }
|
924 | this._endCalled = true;
|
925 |
|
926 | // store callback
|
927 | this._callback = fn || noop;
|
928 | this._end();
|
929 | };
|
930 | Request.prototype._end = function () {
|
931 | if (this._aborted) return this.callback(new Error('The request has been aborted even before .end() was called'));
|
932 | let data = this._data;
|
933 | const req = this.req;
|
934 | const method = this.method;
|
935 | this._setTimeouts();
|
936 |
|
937 | // body
|
938 | if (method !== 'HEAD' && !req._headerSent) {
|
939 | // serialize stuff
|
940 | if (typeof data !== 'string') {
|
941 | let contentType = req.getHeader('Content-Type');
|
942 | // Parse out just the content type from the header (ignore the charset)
|
943 | if (contentType) contentType = contentType.split(';')[0];
|
944 | let serialize = this._serializer || exports.serialize[contentType];
|
945 | if (!serialize && isJSON(contentType)) {
|
946 | serialize = exports.serialize['application/json'];
|
947 | }
|
948 | if (serialize) data = serialize(data);
|
949 | }
|
950 |
|
951 | // content-length
|
952 | if (data && !req.getHeader('Content-Length')) {
|
953 | req.setHeader('Content-Length', Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data));
|
954 | }
|
955 | }
|
956 |
|
957 | // response
|
958 | // eslint-disable-next-line complexity
|
959 | req.once('response', res => {
|
960 | debug('%s %s -> %s', this.method, this.url, res.statusCode);
|
961 | if (this._responseTimeoutTimer) {
|
962 | clearTimeout(this._responseTimeoutTimer);
|
963 | }
|
964 | if (this.piped) {
|
965 | return;
|
966 | }
|
967 | const max = this._maxRedirects;
|
968 | const mime = utils.type(res.headers['content-type'] || '') || 'text/plain';
|
969 | let type = mime.split('/')[0];
|
970 | if (type) type = type.toLowerCase().trim();
|
971 | const multipart = type === 'multipart';
|
972 | const redirect = isRedirect(res.statusCode);
|
973 | const responseType = this._responseType;
|
974 | this.res = res;
|
975 |
|
976 | // redirect
|
977 | if (redirect && this._redirects++ !== max) {
|
978 | return this._redirect(res);
|
979 | }
|
980 | if (this.method === 'HEAD') {
|
981 | this.emit('end');
|
982 | this.callback(null, this._emitResponse());
|
983 | return;
|
984 | }
|
985 |
|
986 | // zlib support
|
987 | if (this._shouldUnzip(res)) {
|
988 | unzip(req, res);
|
989 | }
|
990 | let buffer = this._buffer;
|
991 | if (buffer === undefined && mime in exports.buffer) {
|
992 | buffer = Boolean(exports.buffer[mime]);
|
993 | }
|
994 | let parser = this._parser;
|
995 | if (undefined === buffer && parser) {
|
996 | console.warn("A custom superagent parser has been set, but buffering strategy for the parser hasn't been configured. Call `req.buffer(true or false)` or set `superagent.buffer[mime] = true or false`");
|
997 | buffer = true;
|
998 | }
|
999 | if (!parser) {
|
1000 | if (responseType) {
|
1001 | parser = exports.parse.image; // It's actually a generic Buffer
|
1002 | buffer = true;
|
1003 | } else if (multipart) {
|
1004 | const form = formidable();
|
1005 | parser = form.parse.bind(form);
|
1006 | buffer = true;
|
1007 | } else if (isBinary(mime)) {
|
1008 | parser = exports.parse.image;
|
1009 | buffer = true; // For backwards-compatibility buffering default is ad-hoc MIME-dependent
|
1010 | } else if (exports.parse[mime]) {
|
1011 | parser = exports.parse[mime];
|
1012 | } else if (type === 'text') {
|
1013 | parser = exports.parse.text;
|
1014 | buffer = buffer !== false;
|
1015 | // everyone wants their own white-labeled json
|
1016 | } else if (isJSON(mime)) {
|
1017 | parser = exports.parse['application/json'];
|
1018 | buffer = buffer !== false;
|
1019 | } else if (buffer) {
|
1020 | parser = exports.parse.text;
|
1021 | } else if (undefined === buffer) {
|
1022 | parser = exports.parse.image; // It's actually a generic Buffer
|
1023 | buffer = true;
|
1024 | }
|
1025 | }
|
1026 |
|
1027 | // by default only buffer text/*, json and messed up thing from hell
|
1028 | if (undefined === buffer && isText(mime) || isJSON(mime)) {
|
1029 | buffer = true;
|
1030 | }
|
1031 | this._resBuffered = buffer;
|
1032 | let parserHandlesEnd = false;
|
1033 | if (buffer) {
|
1034 | // Protectiona against zip bombs and other nuisance
|
1035 | let responseBytesLeft = this._maxResponseSize || 200000000;
|
1036 | res.on('data', buf => {
|
1037 | responseBytesLeft -= buf.byteLength || buf.length > 0 ? buf.length : 0;
|
1038 | if (responseBytesLeft < 0) {
|
1039 | // This will propagate through error event
|
1040 | const error = new Error('Maximum response size reached');
|
1041 | error.code = 'ETOOLARGE';
|
1042 | // Parsers aren't required to observe error event,
|
1043 | // so would incorrectly report success
|
1044 | parserHandlesEnd = false;
|
1045 | // Will not emit error event
|
1046 | res.destroy(error);
|
1047 | // so we do callback now
|
1048 | this.callback(error, null);
|
1049 | }
|
1050 | });
|
1051 | }
|
1052 | if (parser) {
|
1053 | try {
|
1054 | // Unbuffered parsers are supposed to emit response early,
|
1055 | // which is weird BTW, because response.body won't be there.
|
1056 | parserHandlesEnd = buffer;
|
1057 | parser(res, (error, object, files) => {
|
1058 | if (this.timedout) {
|
1059 | // Timeout has already handled all callbacks
|
1060 | return;
|
1061 | }
|
1062 |
|
1063 | // Intentional (non-timeout) abort is supposed to preserve partial response,
|
1064 | // even if it doesn't parse.
|
1065 | if (error && !this._aborted) {
|
1066 | return this.callback(error);
|
1067 | }
|
1068 | if (parserHandlesEnd) {
|
1069 | this.emit('end');
|
1070 | this.callback(null, this._emitResponse(object, files));
|
1071 | }
|
1072 | });
|
1073 | } catch (err) {
|
1074 | this.callback(err);
|
1075 | return;
|
1076 | }
|
1077 | }
|
1078 | this.res = res;
|
1079 |
|
1080 | // unbuffered
|
1081 | if (!buffer) {
|
1082 | debug('unbuffered %s %s', this.method, this.url);
|
1083 | this.callback(null, this._emitResponse());
|
1084 | if (multipart) return; // allow multipart to handle end event
|
1085 | res.once('end', () => {
|
1086 | debug('end %s %s', this.method, this.url);
|
1087 | this.emit('end');
|
1088 | });
|
1089 | return;
|
1090 | }
|
1091 |
|
1092 | // terminating events
|
1093 | res.once('error', error => {
|
1094 | parserHandlesEnd = false;
|
1095 | this.callback(error, null);
|
1096 | });
|
1097 | if (!parserHandlesEnd) res.once('end', () => {
|
1098 | debug('end %s %s', this.method, this.url);
|
1099 | // TODO: unless buffering emit earlier to stream
|
1100 | this.emit('end');
|
1101 | this.callback(null, this._emitResponse());
|
1102 | });
|
1103 | });
|
1104 | this.emit('request', this);
|
1105 | const getProgressMonitor = () => {
|
1106 | const lengthComputable = true;
|
1107 | const total = req.getHeader('Content-Length');
|
1108 | let loaded = 0;
|
1109 | const progress = new Stream.Transform();
|
1110 | progress._transform = (chunk, encoding, callback) => {
|
1111 | loaded += chunk.length;
|
1112 | this.emit('progress', {
|
1113 | direction: 'upload',
|
1114 | lengthComputable,
|
1115 | loaded,
|
1116 | total
|
1117 | });
|
1118 | callback(null, chunk);
|
1119 | };
|
1120 | return progress;
|
1121 | };
|
1122 | const bufferToChunks = buffer => {
|
1123 | const chunkSize = 16 * 1024; // default highWaterMark value
|
1124 | const chunking = new Stream.Readable();
|
1125 | const totalLength = buffer.length;
|
1126 | const remainder = totalLength % chunkSize;
|
1127 | const cutoff = totalLength - remainder;
|
1128 | for (let i = 0; i < cutoff; i += chunkSize) {
|
1129 | const chunk = buffer.slice(i, i + chunkSize);
|
1130 | chunking.push(chunk);
|
1131 | }
|
1132 | if (remainder > 0) {
|
1133 | const remainderBuffer = buffer.slice(-remainder);
|
1134 | chunking.push(remainderBuffer);
|
1135 | }
|
1136 | chunking.push(null); // no more data
|
1137 |
|
1138 | return chunking;
|
1139 | };
|
1140 |
|
1141 | // if a FormData instance got created, then we send that as the request body
|
1142 | const formData = this._formData;
|
1143 | if (formData) {
|
1144 | // set headers
|
1145 | const headers = formData.getHeaders();
|
1146 | for (const i in headers) {
|
1147 | if (hasOwn(headers, i)) {
|
1148 | debug('setting FormData header: "%s: %s"', i, headers[i]);
|
1149 | req.setHeader(i, headers[i]);
|
1150 | }
|
1151 | }
|
1152 |
|
1153 | // attempt to get "Content-Length" header
|
1154 | formData.getLength((error, length) => {
|
1155 | // TODO: Add chunked encoding when no length (if err)
|
1156 | if (error) debug('formData.getLength had error', error, length);
|
1157 | debug('got FormData Content-Length: %s', length);
|
1158 | if (typeof length === 'number') {
|
1159 | req.setHeader('Content-Length', length);
|
1160 | }
|
1161 | formData.pipe(getProgressMonitor()).pipe(req);
|
1162 | });
|
1163 | } else if (Buffer.isBuffer(data)) {
|
1164 | bufferToChunks(data).pipe(getProgressMonitor()).pipe(req);
|
1165 | } else {
|
1166 | req.end(data);
|
1167 | }
|
1168 | };
|
1169 |
|
1170 | // Check whether response has a non-0-sized gzip-encoded body
|
1171 | Request.prototype._shouldUnzip = res => {
|
1172 | if (res.statusCode === 204 || res.statusCode === 304) {
|
1173 | // These aren't supposed to have any body
|
1174 | return false;
|
1175 | }
|
1176 |
|
1177 | // header content is a string, and distinction between 0 and no information is crucial
|
1178 | if (res.headers['content-length'] === '0') {
|
1179 | // We know that the body is empty (unfortunately, this check does not cover chunked encoding)
|
1180 | return false;
|
1181 | }
|
1182 |
|
1183 | // console.log(res);
|
1184 | return /^\s*(?:deflate|gzip)\s*$/.test(res.headers['content-encoding']);
|
1185 | };
|
1186 |
|
1187 | /**
|
1188 | * Overrides DNS for selected hostnames. Takes object mapping hostnames to IP addresses.
|
1189 | *
|
1190 | * When making a request to a URL with a hostname exactly matching a key in the object,
|
1191 | * use the given IP address to connect, instead of using DNS to resolve the hostname.
|
1192 | *
|
1193 | * A special host `*` matches every hostname (keep redirects in mind!)
|
1194 | *
|
1195 | * request.connect({
|
1196 | * 'test.example.com': '127.0.0.1',
|
1197 | * 'ipv6.example.com': '::1',
|
1198 | * })
|
1199 | */
|
1200 | Request.prototype.connect = function (connectOverride) {
|
1201 | if (typeof connectOverride === 'string') {
|
1202 | this._connectOverride = {
|
1203 | '*': connectOverride
|
1204 | };
|
1205 | } else if (typeof connectOverride === 'object') {
|
1206 | this._connectOverride = connectOverride;
|
1207 | } else {
|
1208 | this._connectOverride = undefined;
|
1209 | }
|
1210 | return this;
|
1211 | };
|
1212 | Request.prototype.trustLocalhost = function (toggle) {
|
1213 | this._trustLocalhost = toggle === undefined ? true : toggle;
|
1214 | return this;
|
1215 | };
|
1216 |
|
1217 | // generate HTTP verb methods
|
1218 | if (!methods.includes('del')) {
|
1219 | // create a copy so we don't cause conflicts with
|
1220 | // other packages using the methods package and
|
1221 | // npm 3.x
|
1222 | methods = [...methods];
|
1223 | methods.push('del');
|
1224 | }
|
1225 | var _iterator = _createForOfIteratorHelper(methods),
|
1226 | _step;
|
1227 | try {
|
1228 | for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
1229 | let method = _step.value;
|
1230 | const name = method;
|
1231 | method = method === 'del' ? 'delete' : method;
|
1232 | method = method.toUpperCase();
|
1233 | request[name] = (url, data, fn) => {
|
1234 | const request_ = request(method, url);
|
1235 | if (typeof data === 'function') {
|
1236 | fn = data;
|
1237 | data = null;
|
1238 | }
|
1239 | if (data) {
|
1240 | if (method === 'GET' || method === 'HEAD') {
|
1241 | request_.query(data);
|
1242 | } else {
|
1243 | request_.send(data);
|
1244 | }
|
1245 | }
|
1246 | if (fn) request_.end(fn);
|
1247 | return request_;
|
1248 | };
|
1249 | }
|
1250 |
|
1251 | /**
|
1252 | * Check if `mime` is text and should be buffered.
|
1253 | *
|
1254 | * @param {String} mime
|
1255 | * @return {Boolean}
|
1256 | * @api public
|
1257 | */
|
1258 | } catch (err) {
|
1259 | _iterator.e(err);
|
1260 | } finally {
|
1261 | _iterator.f();
|
1262 | }
|
1263 | function isText(mime) {
|
1264 | const parts = mime.split('/');
|
1265 | let type = parts[0];
|
1266 | if (type) type = type.toLowerCase().trim();
|
1267 | let subtype = parts[1];
|
1268 | if (subtype) subtype = subtype.toLowerCase().trim();
|
1269 | return type === 'text' || subtype === 'x-www-form-urlencoded';
|
1270 | }
|
1271 |
|
1272 | // This is not a catchall, but a start. It might be useful
|
1273 | // in the long run to have file that includes all binary
|
1274 | // content types from https://www.iana.org/assignments/media-types/media-types.xhtml
|
1275 | function isBinary(mime) {
|
1276 | let _mime$split = mime.split('/'),
|
1277 | _mime$split2 = _slicedToArray(_mime$split, 2),
|
1278 | registry = _mime$split2[0],
|
1279 | name = _mime$split2[1];
|
1280 | if (registry) registry = registry.toLowerCase().trim();
|
1281 | if (name) name = name.toLowerCase().trim();
|
1282 | return ['audio', 'font', 'image', 'video'].includes(registry) || ['gz', 'gzip'].includes(name);
|
1283 | }
|
1284 |
|
1285 | /**
|
1286 | * Check if `mime` is json or has +json structured syntax suffix.
|
1287 | *
|
1288 | * @param {String} mime
|
1289 | * @return {Boolean}
|
1290 | * @api private
|
1291 | */
|
1292 |
|
1293 | function isJSON(mime) {
|
1294 | // should match /json or +json
|
1295 | // but not /json-seq
|
1296 | return /[/+]json($|[^-\w])/i.test(mime);
|
1297 | }
|
1298 |
|
1299 | /**
|
1300 | * Check if we should follow the redirect `code`.
|
1301 | *
|
1302 | * @param {Number} code
|
1303 | * @return {Boolean}
|
1304 | * @api private
|
1305 | */
|
1306 |
|
1307 | function isRedirect(code) {
|
1308 | return [301, 302, 303, 305, 307, 308].includes(code);
|
1309 | }
|
1310 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVxdWlyZSIsInJlcXVpcmUiLCJwYXJzZSIsImZvcm1hdCIsInJlc29sdmUiLCJTdHJlYW0iLCJodHRwcyIsImh0dHAiLCJmcyIsInpsaWIiLCJ1dGlsIiwicXMiLCJtaW1lIiwibWV0aG9kcyIsIkZvcm1EYXRhIiwiZm9ybWlkYWJsZSIsImRlYnVnIiwiQ29va2llSmFyIiwic2VtdmVyR3RlIiwic2FmZVN0cmluZ2lmeSIsInV0aWxzIiwiUmVxdWVzdEJhc2UiLCJfcmVxdWlyZTIiLCJ1bnppcCIsIlJlc3BvbnNlIiwibWl4aW4iLCJoYXNPd24iLCJodHRwMiIsInByb2Nlc3MiLCJ2ZXJzaW9uIiwicmVxdWVzdCIsIm1ldGhvZCIsInVybCIsImV4cG9ydHMiLCJSZXF1ZXN0IiwiZW5kIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwibW9kdWxlIiwiYWdlbnQiLCJub29wIiwiZGVmaW5lIiwicHJvdG9jb2xzIiwic2VyaWFsaXplIiwic3RyaW5naWZ5IiwiYnVmZmVyIiwiX2luaXRIZWFkZXJzIiwicmVxdWVzdF8iLCJfaGVhZGVyIiwiaGVhZGVyIiwiY2FsbCIsIl9lbmFibGVIdHRwMiIsIkJvb2xlYW4iLCJlbnYiLCJIVFRQMl9URVNUIiwiX2FnZW50IiwiX2Zvcm1EYXRhIiwid3JpdG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