We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dest
For consistency, it should probably return the dest writable stream that was passed in, for chaining. https://github.com/joyent/node/blob/master/lib/stream.js#L125-L126
The text was updated successfully, but these errors were encountered:
Looks like it's simple as:
diff --git a/lib/node/index.js b/lib/node/index.js index 4d21f1c..c8689a7 100644 --- a/lib/node/index.js +++ b/lib/node/index.js @@ -375,15 +375,16 @@ Request.prototype.write = function(data, encoding){ * * @param {Stream} stream * @param {Object} options - * @return {Request} for chaining + * @return {Stream} the `stream` argument, for chaining * @api public */ Request.prototype.pipe = function(stream, options){ this.buffer(false); - return this.end().req.on('response', function(res){ + this.end().req.on('response', function(res){ res.pipe(stream, options); }); + return stream; }; /**
Sorry, something went wrong.
d17e466
thanks!
No branches or pull requests
For consistency, it should probably return the
dest
writable stream that was passed in, for chaining.https://github.com/joyent/node/blob/master/lib/stream.js#L125-L126
The text was updated successfully, but these errors were encountered: