Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTTP crate #3

Closed
olanod opened this issue Aug 3, 2022 · 3 comments
Closed

Use HTTP crate #3

olanod opened this issue Aug 3, 2022 · 3 comments

Comments

@olanod
Copy link

olanod commented Aug 3, 2022

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(hyperium/http#563) although the PR still relies on alloc which I'm not sure if it's acceptable for this client.

@lulf
Copy link
Member

lulf commented Aug 3, 2022

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
Copy link
Author

olanod commented Aug 3, 2022

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
Copy link
Member

rmja commented Feb 17, 2023

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

@rmja rmja closed this as completed Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants