I've been messing around with HTTP over the past few days by building a simple CL download manager in Rust using the reqwest crate to handle the HTTP stuff. I've got a basic understanding of how the protocol works - what headers to look for when downloading a file, how to verify the request has worked etc. - but I'm having trouble finding an answer as to where the actual bytes in the body of a HTTP response are stored.
For example, sending a request and getting a response with reqwest takes very little time, so I figure that the downloading can't happen at this stage. What actually takes time is reading the bytes from the body. But surely this body can't be stored in RAM, as downloading a large file would make memory use skyrocket. I realise that where this data is stored may be different across different HTTP frameworks, but I suppose that what I'm after is a more general explanation of where a large HTTP response body is stored when not using a browser to download a file.