Browse Source

Merge pull request #121 from sindresorhus/check-for-stream

Check for pipe method only
http2
Sindre Sorhus 9 years ago
parent
commit
398eacccc6
  1. 2
      index.js

2
index.js

@ -84,7 +84,7 @@ function asCallback(opts, cb) {
var ee = requestAsEventEmitter(opts);
ee.on('request', function (req) {
if (isStream.readable(opts.body)) {
if (isStream(opts.body)) {
opts.body.pipe(req);
opts.body = undefined;
return;

Loading…
Cancel
Save