matrix-sdk: Implement sending of Http DELETE requests.

master
Damir Jelić 2020-06-09 16:29:17 +02:00
parent abe40dff11
commit 442464add6
1 changed files with 8 additions and 2 deletions

View File

@ -942,8 +942,14 @@ impl Client {
.body(body)
.header(reqwest::header::CONTENT_TYPE, "application/json")
}
HttpMethod::DELETE => unimplemented!(),
_ => panic!("Unsuported method"),
HttpMethod::DELETE => {
let body = request.body().clone();
self.http_client
.delete(url)
.body(body)
.header(reqwest::header::CONTENT_TYPE, "application/json")
}
method => panic!("Unsuported method {}", method),
};
let request_builder = if requires_auth {