From 827bc696531a07da0605870d8c25bf4bb0a91f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuffel?= Date: Sun, 9 Jan 2022 16:10:06 +0100 Subject: [PATCH 1/2] fix: header flag parsing --- args.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/args.go b/args.go index d8c1692..437b0d2 100644 --- a/args.go +++ b/args.go @@ -56,7 +56,7 @@ func parseArgs() (common.Config, error) { Int(), Method: app.Flag("method", "The HTTP request method (GET, POST, PUT, PATCH or DELETE).").Default("GET").Enum("GET", "POST", "PUT", "PATCH", "DELETE"), Body: parseRequestBody(app.Flag("body", "HTTP request body.").Short('b').PlaceHolder("\"{data...\"")), - Headers: parseRequestHeaders(kingpin.Flag("header", "HTTP request header(s). You can set more than one header by repeating this flag.").Short('h').PlaceHolder("\"k:v\"")), + Headers: parseRequestHeaders(app.Flag("header", "HTTP request header(s). You can set more than one header by repeating this flag.").Short('h').PlaceHolder("\"k:v\"")), TrustAll: app.Flag("trust-all", "Omit SSL certificate validation.").Bool(), Format: app.Flag("format", "Load test report format. Either 'default' (verbose), 'json' or 'yaml'. When json or yaml is specified, apart from the load test results, no additional info will be written to std out."). Short('f'). From 9282b8c2fde1c9aefc26c5f0b42dba2f54535f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuffel?= Date: Sun, 9 Jan 2022 16:11:28 +0100 Subject: [PATCH 2/2] docs: add --header flag in usage docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4f87393..a2147b0 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ Flags: --method=GET The HTTP request method (GET, POST, PUT, PATCH or DELETE). -b, --body="{data..." HTTP request body. + -h, --header="k:v" ... HTTP request header(s). You can set more than one + header by repeating this flag. --trust-all Omit SSL certificate validation. -f, --format=default Load test report format. Either 'default' (verbose), 'json' or 'yaml'. When json or yaml is specified,