fetch stream
async function* streamAsyncIterator(stream) { const reader = stream.getReader() try { while (true) { const { done, value } = await reader.read() if (done) return yield value } } finally { reader.releaseLock() } } const res = await fetch(url, { method: 'POST', headers: { Accept: "application/json", 'Content-Type': 'application/json' }, body: JSON.stringify({}) }) for await (const item of streamAsyncIterator(res.body)) datas.push(item)

Seonglae Cho