Merge pull request 'Add User-Agent to requests' (#17) from BlankParenthesis/hopper:add-user-agent into main

Reviewed-on: #17
This commit is contained in:
Emma Tebibyte 2022-12-24 03:47:48 +00:00
commit 3c87609720
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,10 @@ impl HopperClient {
pub fn new(config: Config) -> Self {
Self {
config: config,
client: reqwest::Client::new(),
client: reqwest::ClientBuilder::new()
.user_agent(format!("tebibytemedia/hopper/{} (tebibyte.media)", env!("CARGO_PKG_VERSION")))
.build()
.unwrap(),
}
}