Comparing version 2.0.0 to 2.0.1
10
index.js
@@ -24,6 +24,8 @@ 'use strict' | ||
const req = (parsedUrl.protocol === 'https:' ? https : http).request(Object.assign({ | ||
method: options.method || 'GET', | ||
headers: Object.assign({ Range: 'bytes=' + start + '-' }, options.headers) | ||
}, parsedUrl), res => { | ||
const req = (parsedUrl.protocol === 'https:' ? https : http).request(Object.assign( | ||
{ method: 'GET' }, | ||
parsedUrl, | ||
options, | ||
{ headers: Object.assign({ Range: 'bytes=' + start + '-' }, options.headers) } | ||
), res => { | ||
options.onresponse && options.onresponse(res) | ||
@@ -30,0 +32,0 @@ |
{ | ||
"name": "downit", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Resumeable downloader", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4727
69