Is it ok to pass in a huge buffer and read everything at once?
Is there a way to read the content in chunks - for example read the start line, then all the headers (line by line) and then the body?
References
https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages
https://www.rfc-editor.org/rfc/rfc9112.html
HTTP messages are how data is exchanged between a server and a client. There are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server.
The Hypertext Transfer Protocol (HTTP) is a stateless application-level
protocol for distributed, collaborative, hypertext information systems.
This document specifies the HTTP/1.1 message syntax, message parsing,
connection management, and related security concerns.
This document obsoletes portions of RFC 7230....