From 77aee7e54366e78ca2041b4eb321787557e8ad9c Mon Sep 17 00:00:00 2001 From: Mel Massadian Date: Mon, 22 May 2023 20:55:19 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20"http=20get",=20add=20an?= =?UTF-8?q?=20example=20with=20more=20than=20one=20header=20(#9240)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description I was trying `-H [key-A val-A] -H [key-B val-B]` but thanks to @Dorumin I discovered how it should be used. This PR just adds an extra example to the help with multiple headers. Feel free to edit it either to merge both header examples into one or rename the key value used, but I think it would be nice to have a sample as the multiple -H variant doesn't error out it wasn't obvious to me. # User-Facing Changes One more help example in `help http get` # Tests + Formatting # After Submitting --- crates/nu-command/src/network/http/get.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/nu-command/src/network/http/get.rs b/crates/nu-command/src/network/http/get.rs index a13dd2c332..a8586b9848 100644 --- a/crates/nu-command/src/network/http/get.rs +++ b/crates/nu-command/src/network/http/get.rs @@ -118,6 +118,11 @@ impl Command for SubCommand { example: "http get -H [my-header-key my-header-value] https://www.example.com", result: None, }, + Example { + description: "Get content from example.com, with custom headers", + example: "http get -H [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", + result: None, + }, ] } }