Skip to content

Commit ba5c9af

Browse files
committed
docs(api): add example for --input option
Signed-off-by: Babak K. Shandiz <babakks@github.com>
1 parent ad0252e commit ba5c9af

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/cmd/api/api.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command
143143
# Add parameters to a GET request
144144
$ gh api -X GET search/issues -f q='repo:cli/cli is:open remote'
145145
146+
# Use a JSON file as request body
147+
$ gh api repos/{owner}/{repo}/rulesets --input file.json
148+
146149
# Set a custom HTTP header
147150
$ gh api -H 'Accept: application/vnd.github.v3.raw+json' ...
148151

0 commit comments

Comments
 (0)