docs: Clarifying method change when using --update for api command

This commit is contained in:
Gary Holtz 2023-06-19 03:09:02 +00:00 committed by Jay McCure
parent bd1f9027ac
commit 954ba27ca3
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ func NewCmdApi(f *cmdutils.Factory, runF func(*ApiOptions) error) *cobra.Command
cmd.Flags().StringVar(&opts.Hostname, "hostname", "", "The GitLab hostname for the request (default is \"gitlab.com\" or authenticated host in current git directory)")
cmd.Flags().StringVarP(&opts.RequestMethod, "method", "X", "GET", "The HTTP method for the request")
cmd.Flags().StringArrayVarP(&opts.MagicFields, "field", "F", nil, "Add a parameter of inferred type")
cmd.Flags().StringArrayVarP(&opts.MagicFields, "field", "F", nil, "Add a parameter of inferred type (changes default HTTP method to \"POST\")")
cmd.Flags().StringArrayVarP(&opts.RawFields, "raw-field", "f", nil, "Add a string parameter")
cmd.Flags().StringArrayVarP(&opts.RequestHeaders, "header", "H", nil, "Add an additional HTTP request header")
cmd.Flags().BoolVarP(&opts.ShowResponseHeaders, "include", "i", false, "Include HTTP response headers in the output")

View File

@ -113,7 +113,7 @@ $ glab api graphql --paginate -f query='
## Options
```plaintext
-F, --field stringArray Add a parameter of inferred type
-F, --field stringArray Add a parameter of inferred type (changes default HTTP method to "POST")
-H, --header stringArray Add an additional HTTP request header
--hostname string The GitLab hostname for the request (default is "gitlab.com" or authenticated host in current git directory)
-i, --include Include HTTP response headers in the output