mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
Allow reqwest to be used without default-tls
This commit is contained in:
@ -12,7 +12,10 @@ serde_with = { version = "^3.8", default-features = false, features = ["base64",
|
||||
serde_json = "^1.0"
|
||||
url = "^2.5"
|
||||
uuid = { version = "^1.8", features = ["serde", "v4"] }
|
||||
reqwest = { version = "^0.12", features = ["json", "cookies", "multipart"] }
|
||||
reqwest = { version = "^0.12", default-features = false, features = ["json", "cookies", "multipart"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = '1', features = ['macros', 'rt-multi-thread'] }
|
||||
tokio = { version = '1', features = ['macros', 'rt-multi-thread'] }
|
||||
|
||||
[features]
|
||||
default = ["reqwest/default"]
|
@ -25,11 +25,15 @@ find src -type f -exec sed -i '/^\s*\/\/\/\s*$/d' {} \;
|
||||
|
||||
# Cookie storage
|
||||
sed -i 's/Client::new()/Client::builder().cookie_store(true).build().unwrap()/g' src/apis/configuration.rs
|
||||
sed -i 's/features = \["json", "multipart"\]/features = \["json", "cookies", "multipart"\]/g' Cargo.toml
|
||||
sed -i 's/, features = \["json", "multipart"\]/, default-features = false, features = \["json", "cookies", "multipart"\]/g' Cargo.toml
|
||||
|
||||
#Fix example
|
||||
printf "\n[dev-dependencies]\ntokio = { version = '1', features = ['macros', 'rt-multi-thread'] }" >> Cargo.toml
|
||||
|
||||
#Add feature section to Cargo.toml
|
||||
printf "\n[features]\ndefault = [\"reqwest/default\"]" >> Cargo.toml
|
||||
|
||||
|
||||
# https://github.com/vrchatapi/specification/issues/241
|
||||
cat patches/2FA_Current_User.rs >> src/models/current_user.rs
|
||||
sed -i 's/pub use self::current_user::CurrentUser;/pub use self::current_user::{EitherUserOrTwoFactor, CurrentUser};/g' src/models/mod.rs
|
||||
|
Reference in New Issue
Block a user