Remove explicit setting of content-type header
`try_into_http_request` takes care of this already.next
parent
61c522dcc0
commit
08ca573df0
|
@ -1,6 +1,5 @@
|
||||||
use crate::{utils, Error, Result};
|
use crate::{utils, Error, Result};
|
||||||
use bytes::BytesMut;
|
use bytes::BytesMut;
|
||||||
use http::header::{HeaderValue, CONTENT_TYPE};
|
|
||||||
use log::warn;
|
use log::warn;
|
||||||
use ruma::api::{IncomingResponse, OutgoingRequest, SendAccessToken};
|
use ruma::api::{IncomingResponse, OutgoingRequest, SendAccessToken};
|
||||||
use std::{
|
use std::{
|
||||||
|
@ -40,11 +39,6 @@ where
|
||||||
);
|
);
|
||||||
*http_request.uri_mut() = parts.try_into().expect("our manipulation is always valid");
|
*http_request.uri_mut() = parts.try_into().expect("our manipulation is always valid");
|
||||||
|
|
||||||
http_request.headers_mut().insert(
|
|
||||||
CONTENT_TYPE,
|
|
||||||
HeaderValue::from_str("application/json").unwrap(),
|
|
||||||
);
|
|
||||||
|
|
||||||
let mut reqwest_request = reqwest::Request::try_from(http_request)
|
let mut reqwest_request = reqwest::Request::try_from(http_request)
|
||||||
.expect("all http requests are valid reqwest requests");
|
.expect("all http requests are valid reqwest requests");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue