You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only thing preventing me from using this otherwise superb http server in more projects
Thank you for the very kind word. It's amazing to see other users of oxhttp. I built it because I wanted to have an HTTP library allowing to stream request and response bodies without having to rely a lot on an async I/O library.
is having some kind of router easily available/reusable.
If this is a desired feature, I'm happy to spend some time to implement it.
That's a great question. I am more keen to keep this library as lightweight as possible. Inside of Oxigraph I just use a match statement and it served me well to implement a REST API.
If you want to add stuff like argument extraction from the path based on URL patterns... maybe building an other crate would make sense (this crate might not even have to depend directly on oxhttp). This way you would be able to iterate without having to wait for code reviews and oxhttp users who don't care about it would not have to pull it in.
Ideally, something that would also be capable of extracting URL parameters would be great.
For query paramters, this is already built-in thanks to the Url crate. request.url().query_pairs() should do the job. For path, this is an other topic (c.f. supra).
The only thing preventing me from using this otherwise superb http server in more projects, is having some kind of router easily available/reusable.
Ideally, something that would also be capable of extracting URL parameters would be great.
If this is a desired feature, I'm happy to spend some time to implement it.
The text was updated successfully, but these errors were encountered: