From 13562a7396f9f2269ef2331213d1fab1701666be Mon Sep 17 00:00:00 2001 From: tuxuser <462620+tuxuser@users.noreply.github.com> Date: Thu, 3 Oct 2024 21:42:19 +0200 Subject: [PATCH] feat: Allow all HTTP methods for request signing --- src/request_signer.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/request_signer.rs b/src/request_signer.rs index f702b2c..6872e98 100644 --- a/src/request_signer.rs +++ b/src/request_signer.rs @@ -119,9 +119,6 @@ impl TryFrom for HttpMessageToSign { .to_string(); let body = match *request.method() { - reqwest::Method::GET => { - vec![] - } reqwest::Method::POST => request .body() .ok_or(Error::InvalidRequest( @@ -132,7 +129,9 @@ impl TryFrom for HttpMessageToSign { "Failed to convert HTTP body to bytes".to_string(), ))? .to_vec(), - _ => panic!("Unhandled HTTP method: {:?}", request.method()), + _ => { + vec![] + } }; let path_and_query = {