From c73170e018f032016c45d41115b68209299921c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radu=20Lucu=C8=9B?= Date: Fri, 19 Jul 2024 18:11:24 +0300 Subject: [PATCH] feat: add -X as a shorthand for --method in HTTP (#120) --- cmd/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/http.go b/cmd/http.go index 2dfc208..6ece2ec 100644 --- a/cmd/http.go +++ b/cmd/http.go @@ -75,7 +75,7 @@ Examples: flags.StringVar(&r.ctx.Host, "host", r.ctx.Host, "specify the Host header to add to the request (default host's defined in command target)") flags.StringVar(&r.ctx.Path, "path", r.ctx.Path, "specify the URL pathname (default \"/\")") flags.StringVar(&r.ctx.Query, "query", r.ctx.Query, "specify a query string to add") - flags.StringVar(&r.ctx.Method, "method", r.ctx.Method, "specify the HTTP method to use: HEAD or GET (default \"HEAD\")") + flags.StringVarP(&r.ctx.Method, "method", "X", r.ctx.Method, "specify the HTTP method to use: HEAD or GET (default \"HEAD\")") flags.StringArrayVarP(&r.ctx.Headers, "header", "H", r.ctx.Headers, "add HTTP headers to the request in the format \"Key: Value\"; to add multiple headers, define the flag for each one separately") flags.BoolVar(&r.ctx.Full, "full", r.ctx.Full, "enable full output when performing an HTTP GET request to display the status, headers, and body")