added accept header to API call for faster response times

This commit is contained in:
uh wot 2022-11-06 20:00:08 +01:00
parent 6a4bec9e70
commit 16cf5dc79b
Signed by: uhwot
GPG Key ID: CB2454984587B781
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@ use serde::{Serialize, Deserialize, de::DeserializeOwned};
use std::{env, marker::Sized, time::Instant, sync::Arc};
use thiserror::Error;
use serde_json::{json, value::from_value};
use reqwest::{Client, Response, cookie::Jar, Url};
use reqwest::{Client, Response, cookie::Jar, Url, header::ACCEPT};
#[derive(Deserialize)]
struct DeezerResponse {
@ -99,6 +99,7 @@ impl APIClient {
("api_version", "1.0"),
("api_token", check_form)
])
.header(ACCEPT, "*/*")
.json(params)
.send()
.await?