You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2786 60d41d6
Thanks @ardatan! - Add User-Agent with node value by default
similar to undici, because fetch implementation should provide one if the user doesn't provide
one per WHATWG spec
#2643 941e5ce
Thanks @ardatan! - In case of iterator cancellation, ensure the
response stream a.k.a. IncomingMessage is properly closed.
constresponse=awaitfetch('http://localhost:3000/stream')forawait(constchunkofresponse.body){console.log('Received chunk:',chunk)if(chunk==='stop'){console.log('Stopping stream')// In case of `break` which calls the `iterator.return()`, we need to ensure the stream is closed properly.break}}