Skip to content
New issue

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

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

Already on GitHub? # to your account

Make sdk http-client agnostic #38

Open
sosthene-nitrokey opened this issue Feb 17, 2025 · 0 comments
Open

Make sdk http-client agnostic #38

sosthene-nitrokey opened this issue Feb 17, 2025 · 0 comments

Comments

@sosthene-nitrokey
Copy link
Contributor

sosthene-nitrokey commented Feb 17, 2025

I wonder if it would make sense to implement the operations in terms of the http crate instead of using ureq directly. This would allow us to make ureq optional and ureq updates would no longer be breaking changes. We could of course still provide a default implementation using ureq.

http is also supported by hyper and reqwest so we would cover all major Rust HTTP clients.

We could either let the user provide something like a Fn(http::Request) -> Result<http::Response, Box<dyn Error>> as part of the Configuration. Or provide structs that can be converted to and from the http types to implement the operations – that would even be compatible with async HTTP clients.

Originally posted by @robin-nitrokey in #35 (comment)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant