Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jellejurre committed Nov 25, 2024
1 parent dffafee commit 0e6e8a0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions examples/cookies_load.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use reqwest::header::{HeaderValue};
use reqwest::cookie::CookieStore;
use reqwest::header::HeaderValue;
use std::str::FromStr;
use std::sync::Arc;
use reqwest::cookie::CookieStore;
pub use vrchatapi::apis;
use vrchatapi::models::{EitherUserOrTwoFactor};
use vrchatapi::models::EitherUserOrTwoFactor;

#[tokio::main]
async fn main() {
Expand All @@ -12,9 +12,14 @@ async fn main() {
config.user_agent = Some(String::from("ProjectName/0.0.1 [email protected]"));

let mut jar = reqwest::cookie::Jar::default();
jar.set_cookies(&mut [HeaderValue::from_str(
&"auth=[AUTH_COOKIE_HERE], twoFactorAuth=[TWO_FACTOR_AUTH_COOKIE_HERE]",
).expect("Cookie not okay")].iter(), &url::Url::from_str("https://api.vrchat.cloud").expect("Url not okay"));
jar.set_cookies(
&mut [HeaderValue::from_str(
&"auth=[AUTH_COOKIE_HERE], twoFactorAuth=[TWO_FACTOR_AUTH_COOKIE_HERE]",
)
.expect("Cookie not okay")]
.iter(),
&url::Url::from_str("https://api.vrchat.cloud").expect("Url not okay"),
);
let jar = Arc::new(jar);

config.client = reqwest::Client::builder()
Expand Down

0 comments on commit 0e6e8a0

Please sign in to comment.