You have parsed the request line, the headers, and the body separately - today you gather them into one Request value, the single object every handler will receive.
Read a full request off a stream and return one Request holding its method, target, version, headers, and body.
Every piece you have built so far — the head reader, the request-line parser, the
header collector, the Content-Length body reader — now snaps together into one
function that turns a raw stream into a Request. This struct is the shape
every handler in the rest of the project speaks; nothing downstream touches raw
bytes again.
The order is fixed by the wire format: read the head, split off the request line,
fold the remaining lines into headers, then read the body its Content-Length
describes. One value comes out carrying everything the request said.
type Request struct {Method, Target, Version stringHeaders HeadersBody []byte}// parseRequest: readHead -> parse request line -> collect headers -> read body