Skip to content

Added new section to gh api examples for headers#2948

Closed
benplay2 wants to merge 1 commit intocli:trunkfrom
benplay2:patch-1
Closed

Added new section to gh api examples for headers#2948
benplay2 wants to merge 1 commit intocli:trunkfrom
benplay2:patch-1

Conversation

@benplay2
Copy link

Added example originally shared in #2941. Demonstrates passing an extra header to the API. This specific example turns the API call into a conditional request.

Not sure if this is an example you'd want to have in your documentation, but I figured that I'd draft it up since there aren't any other examples using the gh api -H tag. It surely would've helped me!

Added example originally shared in cli#2941. Demonstrates passing an extra header to the API. This specific example turns the API call into a conditional request.
@mislav
Copy link
Contributor

mislav commented Feb 12, 2021

@benplay2 Thank you for proposing. I have added a different example for how to set request headers. I have chosen to not add the specific example that you've proposed because it would only work in some shells, but not all of them. 🙇

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