-
Notifications
You must be signed in to change notification settings - Fork 83
Compatible with async-std. #59
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
Conversation
- Fix test errors.
Hello! Thanks for openig this PR! I think it makes a lot of sense to support all runtimes available. DO you think, however, we could support |
hello, providing multiple optional http clients is a good idea, but it can add to the complexity of use. The user does not perceive the difference between reqwest and isahc in terms of functionality, so whether or not to use feature flag requires you to make the trade-off.
|
|
Indeed, it makes more sense to offer an optional feature flag. This requires you to redo the global feature design and update the instructions file. You can just change my PR, or tell me what needs to be done.
|
influxdb/src/client/mod.rs
Outdated
} else { | ||
ReqwestClient::new().post(url) | ||
isahc::post_async("", url.as_str().to_owned()).await |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same order of arguments here too according to my IDE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on my PC :)
@gmg137 How do you think should the global feature design be changed? I thought it might be possible to add a feature flag for toggling between async-std/tokio |
@Empty2k12 Agreed, adding a feature flag is by far the most common practice. |
This is now implemented in #72. Thanks for your interest in the project. |
Note: reqwest is pure rust, isahc relies on curl.