From a1daf96314eb7faf7ead1245d3f0a37db9e68675 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Thu, 18 Nov 2021 15:14:50 +0100 Subject: [PATCH] Clarify magic type conversion of api params (#4434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mislav Marohnić --- pkg/cmd/api/api.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cmd/api/api.go b/pkg/cmd/api/api.go index 94100d820..64d3e07b9 100644 --- a/pkg/cmd/api/api.go +++ b/pkg/cmd/api/api.go @@ -79,13 +79,13 @@ func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command The default HTTP request method is "GET" normally and "POST" if any parameters were added. Override the method with %[1]s--method%[1]s. - Pass one or more %[1]s--raw-field%[1]s values in "key=value" format to add string - parameters to the request payload. To add non-string parameters, see %[1]s--field%[1]s below. - Note that adding request parameters will automatically switch the request method to POST. - To send the parameters as a GET query string instead, use %[1]s--method%[1]s GET. + Pass one or more %[1]s-f/--raw-field%[1]s values in "key=value" format to add static string + parameters to the request payload. To add non-string or otherwise dynamic values, see + %[1]s--field%[1]s below. Note that adding request parameters will automatically switch the + request method to POST. To send the parameters as a GET query string instead, use + %[1]s--method GET%[1]s. - The %[1]s--field%[1]s flag behaves like %[1]s--raw-field%[1]s with magic type conversion based - on the format of the value: + The %[1]s-F/--field%[1]s flag has magic type conversion based on the format of the value: - literal values "true", "false", "null", and integer numbers get converted to appropriate JSON types;