Comment

Comment by scurvy_steve

- Always use a response envelope

I would mostly agree except in 1 case, streaming data is easier without an envelope. Making some array inside an envelope stream is usually more code and messier than just getting some metadata out of header. So if you have something like data integration endpoints and you expect someone could pull many megs of records, consider no envelope.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton