This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add uid to user-agent. (modrinth) #18
- Loading branch information
Showing
3 changed files
with
9 additions
and
5 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
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
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 |
---|---|---|
|
@@ -80,10 +80,13 @@ impl ModelExtensions for ModrinthData { | |
} | ||
} | ||
}; | ||
trace!("query: {:#?}", &query); | ||
let client = reqwest::Client::builder() | ||
.user_agent("TOwInOK/Minecraft-Dependency-Controller ([email protected]) TestPoligon") | ||
.build()?; | ||
trace!(target: "Modrinth", "query: {:#?}", &query); | ||
let user_agent = format!( | ||
"TOwInOK/Minecraft-Dependency-Manager ([email protected]) UID: {}", | ||
machine_uid::get().unwrap() | ||
); | ||
trace!(target: "Modrinth", "User-Agent: {}", &user_agent); | ||
let client = reqwest::Client::builder().user_agent(user_agent).build()?; | ||
|
||
let modrinth_data: Vec<ModrinthData> = | ||
client.get(&link).query(&query).send().await?.json().await?; | ||
|