aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2019-12-09 01:31:12 +0100
committerJokler <jokler.contact@gmail.com>2019-12-09 01:31:12 +0100
commit2e2ffe53d19c03d5653b824dad4b63fe7aa87f3a (patch)
tree5f2835f1fc72afec6399bfc03276fefdfe83729a /src/utils.rs
parent08d30201ad5a893e16ea3c8b327b2325eace1fc9 (diff)
downloadfrippy-2e2ffe53d19c03d5653b824dad4b63fe7aa87f3a.tar.gz
frippy-2e2ffe53d19c03d5653b824dad4b63fe7aa87f3a.zip
Utils: Add Accept-Language header to requests
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils.rs b/src/utils.rs
index f953211..8f68b92 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -2,7 +2,7 @@ use std::borrow::Cow;
use std::io::{self, Read};
use std::time::Duration;
-use reqwest::header::{HeaderValue, CONNECTION};
+use reqwest::header::{HeaderValue, ACCEPT_LANGUAGE, CONNECTION};
use reqwest::{Client, ClientBuilder};
use self::error::{DownloadError, ErrorKind};
@@ -61,6 +61,7 @@ impl<'a> Url<'a> {
let mut response = client
.get(self.url.as_ref())
.header(CONNECTION, HeaderValue::from_static("close"))
+ .header(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.5"))
.send()
.context(ErrorKind::Connection)?;