Skip to content

Comments

apirequest/isReadableStream rework#335

Closed
viktorasm wants to merge 2 commits intogoogleapis:masterfrom
viktorasm:master
Closed

apirequest/isReadableStream rework#335
viktorasm wants to merge 2 commits intogoogleapis:masterfrom
viktorasm:master

Conversation

@viktorasm
Copy link

I tried using a http.get response object directly as GCS media.body, which should be a valid readable stream.

Fixes #334

@ryanseys
Copy link
Contributor

What part of that check is false? I just tried it with a raw http.IncomingMessage and seemed to work fine:

> function isReadableStream(obj) { return obj instanceof stream.Stream && typeof obj._read === 'function' && typeof obj._readableState === 'object'; }
undefined
> var x = new http.IncomingMessage();
undefined
> isReadableStream(x);
true

@ryanseys
Copy link
Contributor

Closing as I don't see a need for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http.ServerResponse is not recognized as ReadableStream

2 participants