From c39322346cf24247dacd7bd935dc23d9836869b3 Mon Sep 17 00:00:00 2001 From: epi Date: Wed, 17 Apr 2024 06:39:42 -0400 Subject: [PATCH] --data implies post request if no other method provided --- src/config/container.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config/container.rs b/src/config/container.rs index cae63489..1d9324d6 100644 --- a/src/config/container.rs +++ b/src/config/container.rs @@ -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") {