X Tutup
Skip to content

Commit a3a7dea

Browse files
authored
Merge pull request cli#3400 from embano1/patch-1
Add note on supported value types in raw-fields
2 parents 47b7987 + 42b5181 commit a3a7dea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cmd/api/api.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command
7777
The default HTTP request method is "GET" normally and "POST" if any parameters
7878
were added. Override the method with %[1]s--method%[1]s.
7979
80-
Pass one or more %[1]s--raw-field%[1]s values in "key=value" format to add
81-
JSON-encoded string parameters to the POST body.
80+
Pass one or more %[1]s--raw-field%[1]s values in "key=value" format to add string
81+
parameters to the request payload. To add non-string parameters, see %[1]s--field%[1]s below.
82+
Note that adding request parameters will automatically switch the request method to POST.
83+
To send the parameters as a GET query string instead, use %[1]s--method%[1]s GET.
8284
8385
The %[1]s--field%[1]s flag behaves like %[1]s--raw-field%[1]s with magic type conversion based
8486
on the format of the value:

0 commit comments

Comments
 (0)
X Tutup