?
This commit is contained in:
parent
3ae1c24e3c
commit
36c215b6f3
@ -28,9 +28,9 @@ async function readResponse(response) {
|
||||
try {
|
||||
function read() {
|
||||
// Recursive function to read the stream
|
||||
reader.read().then(( done, value ) => {
|
||||
console.log(`Done: ${JSON.stringify(done)}`);
|
||||
console.log(`Value: ${new TextDecoder().decode(value)}`);
|
||||
reader.read().then(( chunk ) => {
|
||||
console.log(`Done: ${JSON.stringify(chunk.done)}`);
|
||||
console.log(`Value: ${new TextDecoder().decode(chunk.value)}`);
|
||||
if (done) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user