cli icon indicating copy to clipboard operation
cli copied to clipboard

`gh api` raw data parameter

Open mtfurlan opened this issue 1 year ago • 0 comments

Describe the feature or problem you’d like to solve

I would like to pass a raw json body to gh api because the -f/-F interface feels very clunky to me

I'm not interested in converting it from json to some custom format, I would like to take the json from a query so I have the format, modify it, and send it back

It's frustrating and feels wrong that when looking at the github api documentation the curl examples are much easier to understand than the gh api examples

Process substitution(gh api ... --input <(echo "$data") or stdin(echo "$data" | gh api ... --input -) work, but they're annoying

Proposed solution

Add -d, --data <data>, like curl, for a normal json string body

Additional context

other people feel the same that json is easier

mtfurlan avatar Jun 28 '24 14:06 mtfurlan