node_modules: update

This commit is contained in:
Dawid Dziurla
2020-11-12 16:31:20 +01:00
parent 345c86e5c4
commit d1b07d9ed7
15 changed files with 52 additions and 91 deletions

View File

@ -10,7 +10,7 @@ const packageData = require('../../package.json');
const MAX_REDIRECTS = 5;
module.exports = function(url, options) {
module.exports = function (url, options) {
return fetch(url, options);
};
@ -33,11 +33,7 @@ function fetch(url, options) {
let fetchRes = options.fetchRes;
let parsed = urllib.parse(url);
let method =
(options.method || '')
.toString()
.trim()
.toUpperCase() || 'GET';
let method = (options.method || '').toString().trim().toUpperCase() || 'GET';
let finished = false;
let cookies;
let body;
@ -115,11 +111,7 @@ function fetch(url, options) {
headers['Content-Length'] = body.length;
}
// if method is not provided, use POST instead of GET
method =
(options.method || '')
.toString()
.trim()
.toUpperCase() || 'POST';
method = (options.method || '').toString().trim().toUpperCase() || 'POST';
}
let req;