Skip to content

Conversation

@ShayBox
Copy link

@ShayBox ShayBox commented Oct 5, 2024

There has to be a feature to enable reqwest/rustls-tls, just disabling reqwest/default/reqwest/native-tls leaves reqwest without SSL, and no way to enable the alternate feature.

@ariesclark ariesclark requested a review from C0D3-M4513R October 5, 2024 22:50
@jellejurre
Copy link
Contributor

jellejurre commented Oct 5, 2024

If i'm seeing #23 correctly, can't you do:

vrchatapi = { version = "1.18.5", default-features = false}
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }

?

If I test this builds and runs on my machine

Copy link
Collaborator

@C0D3-M4513R C0D3-M4513R left a 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.

@C0D3-M4513R
Copy link
Collaborator

Also furthermore, I don't think it should be our choice to override the default tls choice that reqwest makes.
For that reason, I will close this pr.

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 think, that the main issue is, that reqwest doesn't let application owners override the tls choice, if any dependency uses reqwest like we have previously. (On the flip-side, I also see that an override feature like that is also non-trivial, but imo doable).

@C0D3-M4513R C0D3-M4513R closed this Oct 7, 2024
@ShayBox
Copy link
Author

ShayBox commented Sep 7, 2025

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.

@C0D3-M4513R
Copy link
Collaborator

C0D3-M4513R commented Sep 9, 2025

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.

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.

because just importing this crate no longer works alone.

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.

now everyone has to do this, even if they don't want to change it from the default, because now there is no default.

There is a default. See previous point.

C0D3-M4513R added a commit that referenced this pull request Dec 3, 2025
@C0D3-M4513R
Copy link
Collaborator

C0D3-M4513R commented Dec 3, 2025

The generator we use added this in a newer version.
The pr for the generator update is at #39.

C0D3-M4513R added a commit that referenced this pull request Dec 3, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants