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

Stream API #3

Closed
szmarczak opened this issue Sep 4, 2018 · 9 comments · Fixed by #34
Closed

Stream API #3

szmarczak opened this issue Sep 4, 2018 · 9 comments · Fixed by #34
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@szmarczak
Copy link
Collaborator

No description provided.

@sindresorhus
Copy link
Owner

This is also built into Fetch. Maybe we could make an easier API for it though.

https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams

@szmarczak
Copy link
Collaborator Author

+1

@szmarczak
Copy link
Collaborator Author

What about .stream()?

@sindresorhus
Copy link
Owner

👍 I like it.

@sindresorhus sindresorhus added enhancement New feature or request help wanted Extra attention is needed labels Sep 4, 2018
@dangdennis
Copy link
Contributor

I'd like to work on this. Already have been but it's slower going. I wouldn't mind if anyone else is working on it concurrently for some collaboration/merging of ideas as well.

Do you have any other features to add on besides the built-in readableStream and writableStream?

@poppinlp
Copy link
Contributor

poppinlp commented Nov 2, 2018

Hi. How's it going? If you don't mind, i'll make a PR this weekend.

@jdalrymple
Copy link

@sindresorhus was the streaming API ever exposed?

@sholladay
Copy link
Collaborator

@jdalrymple yes, we added the ability to pass a callback function that receives chunks and metadata about the download progress, which you can use for streaming purposes.

https://github.com/sindresorhus/ky#ondownloadprogress

In the future, we will likely also add the ability to get a ReadableStream for the response, as that is already built into fetch().

@jdalrymple
Copy link

jdalrymple commented Jun 16, 2019

Ah! That's what I was looking for. So the response is currently not available to be returned as a readable stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants