Remove TextEncoder call on write to stream

I'm diving into streaming responses and I see myself writing this:
await writer.write(encoder.encode('<h1>Hello world!</h1>'));
await writer.write(encoder.encode('<h1>Hello world!</h1>'));
Is this the right way of appending strings or is it possible to remove the encoder.encode call of the TextEndoer?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server