You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apps.ListUserRepos may return message "specify a custom media type in the 'Accept' header". #797
When I am trying to use Apps.ListUserRepos, I got message like this:
I know this can be fix by adding following accept header:
// in github/github.go line 85~86// https://developer.github.com/changes/2016-09-14-Integrations-Early-Access/mediaTypeIntegrationPreview="application/vnd.github.machine-man-preview+json"
And it can be fix by add following to ListUserRepos function in github/apps_installation.go
I noticed that there is a TODO comment in other function says that TODO: remove custom Accept header when this API fully launches., so I will keep this in my fix.
Activity
dmitshur commentedon Dec 1, 2017
Hi, thanks for reporting this.
I've taken a look at the documentation for that endpoint at https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation and was surprised to find that it doesn't mention anything about a custom Accept header there.
I'd really like to be able to confirm that adding that header is the right fix via documentation.
After digging further, I found PR #436 which mentioned https://developer.github.com/changes/2016-09-14-Integrations-Early-Access/, which includes:
So I think that confirms this is the right thing to do.
Set Accept header in AppsService.ListUserRepos. (#798)
Set Accept header in AppsService.ListUserRepos. (google#798)
Set Accept header in AppsService.ListUserRepos. (google#798)