-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dffafee
commit 0e6e8a0
Showing
1 changed file
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { | ||
|
@@ -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() | ||
|