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

Allow different http client implementations #401

Closed
jplatte opened this issue Jan 25, 2021 · 0 comments · Fixed by #539
Closed

Allow different http client implementations #401

jplatte opened this issue Jan 25, 2021 · 0 comments · Fixed by #539

Comments

@jplatte
Copy link
Member

jplatte commented Jan 25, 2021

To make them not mutually exclusive (for easier testing and less conditional compilation) we should use generics, i.e. have MatrixClient<Hyper<Rustls>> or MatrixClient<Isahc> or MatrixClient<Surf>. This is similar to what we did before with hyper::client::connect::Connect but easier since the types to plug in will be in the same crate (enabled by cargo features) rather than in separate crates.

We may also want to provide a DefaultMatrixClient / DefaultClient type alias with a different definition depending on which features are activated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant