Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to add header to API requests #175

Closed
cartersteinhoff opened this issue Dec 9, 2019 · 5 comments
Closed

Option to add header to API requests #175

cartersteinhoff opened this issue Dec 9, 2019 · 5 comments

Comments

@cartersteinhoff
Copy link

In order to access the "topics" property from the "repository" endpoint, I need to add a header to the request.

"Note: The topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:" - https://developer.github.com/v3/repos/#list-your-repositories

Is there a way to do this currently or can the feature be added?

@parkr
Copy link
Member

parkr commented Jan 15, 2020

In general, we like to decide that having the feature is important and enable the feature for everyone. Since it's additive, it shouldn't break anyone's current workflow. In my opinion, the best thing to do is simply add the value application/vnd.github.mercy-preview+json to the Accept header for everyone unless the latency rises unreasonably, or errors are likely to occur.

@parkr parkr added the feature label Jan 15, 2020
@ashmaroli
Copy link
Member

@cartersteinhoff Support for accessing topics from the repository field has been shipped in v2.13.0. Please give that version a try and let us know if this should remain open..
Thanks.

@parkr
Copy link
Member

parkr commented Jan 17, 2020

Fixed by #166.

@parkr parkr closed this as completed Jan 17, 2020
@ashmaroli
Copy link
Member

@parkr Technically, #166 doesn't allow adding custom header to API requests.. just allows accessing repository topics..

@parkr
Copy link
Member

parkr commented Jan 17, 2020

You’re right!

I don’t think adding custom headers is a feature we’d like here. If it’s just a faster way to get to added fields, I’d rather go through the normal development process and turn it on for everyone by adding the header to the code.

@jekyll jekyll locked and limited conversation to collaborators Jan 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants