Closed olanod closed 1 year ago
We want to avoid alloc for sure, do you think it's feasible to change http to support that? In any case, I think #2 (using httparse) will at least remove some of the duplication we have in reqwless.
It doesn't look trivial to remove the dependency on alloc from http, it relies a lot on Bytes
and has custom types like the HeaderMap
which does allocation, it would likely be a mayor refactor that probably will introduce breaking changes.
I think this can be closed. The http header parsing now uses httparse.
The
http
crate is pretty much the default to use in every HTTP stack and its Request/Response types have generic body types that could be something implementingembedded_io::asynch::{Read, Write}
for example. It's notno_std
friendly yet but that could change(https://github.com/hyperium/http/pull/563) although the PR still relies onalloc
which I'm not sure if it's acceptable for this client.