added accept header to API call for faster response times
This commit is contained in:
parent
6a4bec9e70
commit
16cf5dc79b
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue