Skip to content

Commit

Permalink
--data implies post request if no other method provided
Browse files Browse the repository at this point in the history
  • Loading branch information
epi052 committed Apr 17, 2024
1 parent de9c5c5 commit c393223
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,11 @@ impl Configuration {
} else {
config.data = arg.as_bytes().to_vec();
}

if config.methods == methods() {
// if the user didn't specify a method, we're going to assume they meant to use POST
config.methods = vec![Method::POST.as_str().to_string()];
}
}

if came_from_cli!(args, "stdin") {
Expand Down

0 comments on commit c393223

Please sign in to comment.