Closed bmuddha closed 4 years ago
I second this. Maybe I am missing something, but I don't see how to actually get the body from my request, parse it, and add it to the Request struct. Is there a way to do this?
Exactly what constitutes the body depends on a few things, like if it is HTTP/1.0 or 1.1, if it is a request or response, and the existence of certain headers. Determining those things is out of scope of simply parsing headers, which this crate does.
It would be nice, if one could (at least had an option to) get the body of request, while parsing. Body of HTTP request is a byte sequence anyway, so it just could be stored in Request struct as &[u8], and further manipulation could be left to the user.