Skip to content

Commit

Permalink
request English from the Deezer API
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemis21 committed Feb 13, 2024
1 parent 3939a95 commit 6cb0656
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/deezer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ const API_URL: &str = "https://api.deezer.com";

lazy_static! {
/// A shared HTTP client for making requests to the API.
static ref CLIENT: reqwest::Client = reqwest::Client::new();
static ref CLIENT: reqwest::Client = {
let mut headers = reqwest::header::HeaderMap::new();
headers.insert(reqwest::header::ACCEPT_LANGUAGE, "en".parse().unwrap());
reqwest::Client::builder().default_headers(headers).build().unwrap()
};
}

/// Fetch the "chart" (a list of popular tracks) for a given genre.
Expand Down

0 comments on commit 6cb0656

Please sign in to comment.