Open cvng opened 9 years ago
Not sure that I agree with the fix suggested here, but this library does need the ability to deal with streamed responses over a long lived connection. +1 eg: Twitter has a streaming API.
After taking a longer peek at the source, it looks like omitting a callback makes _performSecureRequest
return the node request object, which you can then treat any way you want.
Yes I remember that was for the Twitter streaming API, but that was 2 years now, no PR was merged in the meanwhile?
@ciaranj Would you accept a PR that contained a new example of how to interact with Twitter's streaming API?
Hi there, and thanks for this great oAuth implementation.
However, i found myself unable to work with stream response with actual implementation, because
_performSecureRequest
wait for the end / close event before returning data.A simple fix would be
passBackControl
immediately, when response is a stream, and let the user collect the chunk:Hoping that helps :-)