Skip to content

Commit b49c823

Browse files
committed
fix: force json for all plex client requests #147
1 parent ce6ed00 commit b49c823

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plex_client.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,14 @@ impl PlexClient {
8888
self.host,
8989
&req.uri_mut().path_and_query().unwrap()
9090
);
91+
92+
let mut headers = req.headers_mut().clone();
93+
headers.remove(ACCEPT); // remove accept as we always do json request
9194

9295
let res = self
9396
.http_client
9497
.request(req.method_mut().to_owned(), url)
95-
.headers(req.headers_mut().clone())
98+
.headers(headers)
9699
.send()
97100
.await
98101
.map_err(Error::other)?;

0 commit comments

Comments
 (0)