Skip to content

Commit

Permalink
Fix body for put and patch verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
fcsonline committed Sep 14, 2020
1 parent 5a0bfb0 commit 8b23483
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ impl Request {
"GET".to_string()
};

let body = if method == "POST" {
let body_verbs = vec!["POST", "PATCH", "PUT"];
let body = if body_verbs.contains(&method.as_str()) {
Some(extract(&item["request"], "body"))
} else {
None
Expand Down

0 comments on commit 8b23483

Please sign in to comment.