Coder Social home page Coder Social logo

Stream API about ky HOT 9 CLOSED

sindresorhus avatar sindresorhus commented on May 16, 2024 1
Stream API

from ky.

Comments (9)

sindresorhus avatar sindresorhus commented on May 16, 2024 2

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

from ky.

szmarczak avatar szmarczak commented on May 16, 2024

+1

from ky.

szmarczak avatar szmarczak commented on May 16, 2024

What about .stream()?

from ky.

sindresorhus avatar sindresorhus commented on May 16, 2024

👍 I like it.

from ky.

dangdennis avatar dangdennis commented on May 16, 2024

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?

from ky.

poppinlp avatar poppinlp commented on May 16, 2024

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

from ky.

jdalrymple avatar jdalrymple commented on May 16, 2024

@sindresorhus was the streaming API ever exposed?

from ky.

sholladay avatar sholladay commented on May 16, 2024

@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().

from ky.

jdalrymple avatar jdalrymple commented on May 16, 2024

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

from ky.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.