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

re-export client types and isahc::Error #110

Open
abonander opened this issue Nov 22, 2019 · 2 comments
Open

re-export client types and isahc::Error #110

abonander opened this issue Nov 22, 2019 · 2 comments

Comments

@abonander
Copy link
Contributor

As it stands, Client<NativeClient>, Client<IsahcClient> and friends are not nameable by consumers of the crate, which causes issues if the user wants to put a client in a struct.

Additionally, IsahcClient wraps isahc::Error into Exception, so if you want to downcast you need to add the right version of isahc as a dependency: https://www.reddit.com/r/rust/comments/dy273n/hey_rustaceans_got_an_easy_question_ask_here/f8badd4/

(I'm posting this before that user has replied so I'm not 100% sure if that's the problem they're running into.)

@yoshuawuyts
Copy link
Member

I don't think Surf would want to re-export Isahc::Error, but I've filed http-rs/http-client#6 so the http-client impl can.

Additionally #96 also covers the generic type issue. Thanks!

@3699n
Copy link

3699n commented May 28, 2020

Any updates on this? I need to put a client in a struct, but am not able to do so. A work around would be fine for now as well.

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