request-micro
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -19,2 +19,6 @@ module.exports = request | ||
function isStream (o) { | ||
return o !== null && typeof o === 'object' && typeof o.pipe === 'function' | ||
} | ||
function once (fn) { | ||
@@ -72,3 +76,4 @@ var f = function () { | ||
req.on('error', cb) | ||
req.end(body) | ||
if (isStream(body)) body.on('error', cb).pipe(req) | ||
else req.end(body) | ||
return req | ||
@@ -75,0 +80,0 @@ } |
{ | ||
"name": "request-micro", | ||
"description": "A tiny request library with no dependencies. Supports Http(s) and follows redirects", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Timothy Kye", |
6111
120