I am currently trying to dump/load HTTP requests and responses from the Rust library http
to/from a text file and I’m sure that the libraries reqwest
and hyper
also do this somewhere. To determine how they implemented this logic and whether there are public APIs for me to use, I inspected their documentation and source code, but I found no hint where I can find this logic.
I believe, dispatch.rs or http2.rs are somewhere close, but here I don’t see a way to go further. So, could you point me towards the (de)serialization logic of HTTP requests/responses in above-mentioned libraries, i.e., the location where those objects are translated into bytes?
Note, I am aware of some libraries that implement this for HTTP objects, but at this point, I am just curious as to where/how above-mentioned libraries implemented this.