Skip to content

Commit

Permalink
feat: Allow all HTTP methods for request signing
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxuser committed Oct 3, 2024
1 parent d7452d8 commit 13562a7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/request_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ impl TryFrom<reqwest::Request> for HttpMessageToSign {
.to_string();

let body = match *request.method() {
reqwest::Method::GET => {
vec![]
}
reqwest::Method::POST => request
.body()
.ok_or(Error::InvalidRequest(
Expand All @@ -132,7 +129,9 @@ impl TryFrom<reqwest::Request> for HttpMessageToSign {
"Failed to convert HTTP body to bytes".to_string(),
))?
.to_vec(),
_ => panic!("Unhandled HTTP method: {:?}", request.method()),
_ => {
vec![]
}
};

let path_and_query = {
Expand Down

0 comments on commit 13562a7

Please sign in to comment.