Skip to content
New issue

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

support external piping #42

Open
mafintosh opened this issue May 11, 2018 · 3 comments
Open

support external piping #42

mafintosh opened this issue May 11, 2018 · 3 comments

Comments

@mafintosh
Copy link
Collaborator

Right now there doesn't seem to be a way to do

var req = get.post(...)

pump(coolStream, req)

Would be great to support that :)

@bendrucker
Copy link
Collaborator

I added support for using readables as the body in #30. It's obviously not as elegant as piping to a stream returned by simple-get but that seemed like it would clash too much with the existing interface. At a bare minimum, streaming use can't call req.end. I think this would require a different method/option indicating that the user wants a writable stream.

@mafintosh
Copy link
Collaborator Author

@bendrucker possible solution is to nextTick the req.end() and if req.on('pipe') fires inbetween cancel it.

@bendrucker
Copy link
Collaborator

Mmm good point!

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

No branches or pull requests

2 participants