chridou / http-api-problem

A problem type to be returned by HTTP APIs
Apache License 2.0
53 stars 12 forks source link

Depend on the `http` crate? #3

Closed thomaseizinger closed 5 years ago

thomaseizinger commented 5 years ago

The HTTP crate (https://crates.io/crates/http) defines common types around the HTTP world like a StatusCode enum.

Using that one instead of defining a separate one would improve interoperability with other web-frameworks that depend on http already. (For example, warp)

Eventually, it might even be possible to get rid of all the feature-flags if the ecosystem catches up with using types from the http-crate.

Would you accept a PR that refactors the crate to use the http crate and the types from it?

chridou commented 5 years ago

That would be really great and I would thankfully accept a PR. Maybe later one could even think of using the status codes etc. from the http crate.

thomaseizinger commented 5 years ago

Well, using at least the statuscodes from there would be the main thing I'd do as part of that PR :)

On Fri, 2 Nov 2018, 19:53 Christian Douven, notifications@github.com wrote:

That would be really great and I would thankfully accept a PR. Maybe later one could even think of using the status codes etc. from the http crate.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chridou/http-api-problem/issues/3#issuecomment-435312095, or mute the thread https://github.com/notifications/unsubscribe-auth/AFO3NQSTpMBn4r6WrbCiWjVYImmTpTrKks5urAgmgaJpZM4YLI8I .

chridou commented 5 years ago

That would be really cool.

chridou commented 5 years ago

Yes.