drogue-iot / reqwless

Rust async HTTP client for embedded/no_std
Apache License 2.0
129 stars 18 forks source link

Use HTTP crate #3

Closed olanod closed 1 year ago

olanod commented 2 years ago

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 implementing embedded_io::asynch::{Read, Write} for example. It's not no_std friendly yet but that could change(https://github.com/hyperium/http/pull/563) although the PR still relies on alloc which I'm not sure if it's acceptable for this client.

lulf commented 2 years 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.

olanod commented 2 years ago

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.

rmja commented 1 year ago

I think this can be closed. The http header parsing now uses httparse.