_request(options) {
        return new Promise((resolve, reject) => {
            if(!options) {
                throw new Error('Invalid request for connection to the update server!');
            }
            let request = this._getClient(options).request(options, response => {
                if(response.headers.location && response.headers.location.startsWith('http')) {
                    this._request(response.headers.location)
                        .then(data => resolve(data))
                        .catch(error => reject(error));
                    return;
                }
                if(response.statusCode !== 200) {
                    reject(new Error('Status: ' + response.statusCode));
                    return;
                }
                let data = [];
                //response.setEncoding('utf8');
                response.on('data', chunk => data.push(chunk));
                response.on('end', () => resolve(Buffer.concat(data)));
            } );
            request.on('error', error => reject(error));
            //request.write(/* REQUEST BODY */);
            request.end();
        });
    }
Download content via HTTP(S).
@param {string | URL | RequestOptions} options