I am looking for an implementation of HTTP that doesn't open any socket under the hood. I want to be the one opening sockets and writing/reading data, while the library only does the requests and responses parsing and serialization.
Searching crates.io and GitHub I couldn't really find anything like that in the ecosystem, despite the superiority of this approach and the fact that higher-level libraries could be implemented on top of such a crate. However, crates.io is literally swimming in HTTP-related crates, and it's possible that I've simply missed it.
Would someone be aware of the existence of such a crate?
Thanks for the answer but that's not what I'm looking for. It doesn't seem to provide a way to parse or serialize, or to parse in a steaming way, doesn't handle HTTP2, etc.
hyper doesn't open any socket under the hood. Instead, it requires you to pass generic AsyncRead+AsyncWrite type to be used for the underlying connection.
Unfortunately these traits are imported from tokio.
The reason why I'm looking for a sans-io crate is to make it work in a no_std environment. tokio doesn't compile in a no_std environment (and hyper neither).