Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Jun 10, 2020

This is to enable:

  • file uploads
  • constructing and passing in a complex JSON body that could not be constructed via --field

Examples:

# with content-type
$ gh api path/to/endpoint --input myfile.zip -H 'content-type application/zip'

# full hostname
$ gh api https://upload.github.com/path/to/endpoint --input myfile.zip

# from stdin
$ gh api path/to/endpoint --input -

Questions:

  • I've adopted --input from hub, but is there a better/more descriptive name for this flag?

Ref. #332

@mislav mislav requested review from probablycorey and vilmibm June 10, 2020 14:36
Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

@vilmibm
Copy link
Contributor

vilmibm commented Jun 10, 2020

(oh I forgot to say I think --input is totally fine)

@vilmibm vilmibm merged commit 4d95349 into trunk Jun 10, 2020
@mislav mislav deleted the api-raw-body branch June 11, 2020 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants