Accept header clarification


Could someone clarify for sure how apps should formulate Accept headers when making requests? says

In order to access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. application/vnd.github.machine-man-preview+json

  1. Please confirm that apps should use that Accept header for all API requests, not just the new App-specific ones?
  2. What to do when the App wishes to use API endpoints that have their own special header, e.g. the loki or thor ones, etc. Should the app include both strings in the Accept header, and does the order matter?
  3. Assuming the answer to Q1 is “yes”, should Apps ever include application/vnd.github.v3+json, as GitHub otherwise recommends for the REST API?


The header should look like this:

"Accept: application/vnd.github.machine-man-preview+json"
  1. Yes, the accept header should be sent for all calls, not just the App-specific ones.
  2. You can include both headers, and the order doesn’t matter.
  3. No, the preview header is sufficient