Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasq committed Feb 24, 2020
1 parent 631b26b commit 7a3afd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -47,8 +47,9 @@ function microreq( uri, body, callback ) {
if (noReqEnd) requestOptions.headers['Transfer-Encoding'] = 'chunked';
else requestOptions.headers['Content-Length'] = (typeof body === 'string') ? Buffer.byteLength(body) : body ? body.length : 0;

var httpCaller = requestOptions.protocol === 'https:' ? https : http;
var doneCount = 0, body;

var httpCaller = requestOptions.protocol === 'https:' ? https : http;
var req = httpCaller.request(requestOptions, function(res) {
if (noResListen) return (!doneCount++ && callback(null, res));
// readBody from qibl 1.5.0-pre
Expand Down

0 comments on commit 7a3afd4

Please sign in to comment.