ky equivalent of got.stream ? #558
Answered
by
sindresorhus
PixeledCode
asked this question in
Q&A
-
I am trying to migrate from remaining code to be migrated:
|
Beta Was this translation helpful? Give feedback.
Answered by
sindresorhus
Feb 3, 2024
Replies: 1 comment
-
Ky does not currently support streaming, but you could use import {createWriteStream} from 'node:fs';
import {pipeline} from 'node:stream/promises';
const response = await fetch(url);
await pipeline(response.body, createWriteStream(tempFile)); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
PixeledCode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ky does not currently support streaming, but you could use
fetch
directly: