Comment

Comment by rkuska

Now if you use json’s Decoder you can read a body and still might end up without reused connection - if a response contains a newline.

Decoder only reads X bytes (512? I don’t remember) and if the structure fits into these bytes exactly (and the multiplications of it) the newline leaves hanging there.

I always check for Decoder.More (this drains whitespace) after decoding.

parent rkuska 18 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton