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
**Note**: The concept of _preview headers_ has been deprecated from REST API endpoints hosted via `api.github.com` but it still exists in GHES (GitHub Enterprise Server) version 3.2 and below. Instead of using _preview headers_ going forward, new features are now being tested using beta previews that users will have to opt-in to.
520
-
521
-
Media type previews and formats can be set using `mediaType: { format, previews }` on every request. Required API previews are set automatically on the respective REST API endpoint methods.
519
+
Media type formats can be set using `mediaType: { format }` on every request.
522
520
523
521
Example: retrieve the raw content of a `package.json` file
const { data } =awaitoctokit.rest.repos.getContent({
541
-
mediaType: {
542
-
previews: ["mercy"],
543
-
},
544
-
owner:"octocat",
545
-
repo:"hello-world",
546
-
});
547
-
console.log("topics on octocat/hello-world: %j", data.topics);
548
-
```
549
-
550
-
Learn more about [Media type formats](https://docs.github.com/en/rest/overview/media-types) and [previews](https://docs.github.com/en/[email protected]/rest/overview/api-previews) used on GitHub Enterprise Server.
535
+
Learn more about [Media type formats](https://docs.github.com/en/rest/overview/media-types).
0 commit comments