From 442464add63fb9ea608531485f13042b4f50a353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 9 Jun 2020 16:29:17 +0200 Subject: [PATCH] matrix-sdk: Implement sending of Http DELETE requests. --- matrix_sdk/src/client.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index 7b8a4ac6..73562cb7 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -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 {