-
Notifications
You must be signed in to change notification settings - Fork 11
Add a rustls-tls feature #28
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
|
If i'm seeing #23 correctly, can't you do: ? If I test this builds and runs on my machine |
C0D3-M4513R
left a comment
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.
As @jellejurre wrote/implied, the idea here is to use feature unification.
That way we don't have to keep up with the ton of features that reqwest has, whilst still providing the users with maximum configurability.
Both me and @jellejurre tested my pr for #23, and determined, that it works without a flaw with the provided snippet above.
|
Also furthermore, I don't think it should be our choice to override the default tls choice that reqwest makes. We have provided code samples to make your use-case work. I do not think, that copying reqwests features one-to-one is a good idea, especially, when a good feature in rust exists to prevent this. |
|
I DO think it should be our choice as users of this library that uses reqwest to override the default tls choice that reqwest makes. I DO think that copying reqwests features one-to-one is a good idea, that's typically what other libraries that use reqwest do, it's normal. I think that disabling the default feature and requiring users to explicitly import reqwest as an unused dependency to set the tls feature with unification which is fairly unknown makes things more complicated than they need to be, now everyone has to do this, even if they don't want to change it from the default, because now there is no default. You need to update the example on the README to also include a short explanation on why you have to import reqwest and specify a TLS feature, because just importing this crate no longer works alone. |
Can you link some that do that then? Also fyi: Reqwest has like 11 features concerning only how tls works, which, by your statement, we should all copy.
Why doesn't it? We enable reqwest's default feature with the lib's default feature, which enables the default-tls feature, which enables native-tls iirc. It may only not work if you explicitly disable default features and don't enable any reqwest tls handling features.
There is a default. See previous point. |
|
The generator we use added this in a newer version. |
* Update Openapi-Generator Fixes: #28 * Regenerate * Remove sccache * Hide warnings about non-camel-case-types * Implement Multipart handling for generic parameters * Also apply Multipart handling patch onto prints_api.rs
There has to be a feature to enable
reqwest/rustls-tls, just disablingreqwest/default/reqwest/native-tlsleaves reqwest without SSL, and no way to enable the alternate feature.