Skip to content

Commit e2cf78a

Browse files
nickfloydSarah Edwards
andauthored
docs(README): fix "REST API" preview information (#2215)
* Fix REST API preview information * Update README.md Co-authored-by: Sarah Edwards <[email protected]> Co-authored-by: Sarah Edwards <[email protected]>
1 parent e4c622a commit e2cf78a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,8 @@ const issues = await octokit.paginate(octokit.rest.issues.listForRepo, {
491491

492492
#### Media Type previews and formats
493493

494+
**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.
495+
494496
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.
495497

496498
Example: retrieve the raw content of a `package.json` file
@@ -520,7 +522,7 @@ const { data } = octokit.rest.repos.getContent({
520522
console.log("topics on octocat/hello-world: %j", data.topics);
521523
```
522524

523-
Learn more about [Media type formats](https://docs.github.com/en/rest/overview/media-types) and [API previews](https://docs.github.com/en/rest/overview/api-previews).
525+
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.
524526

525527
### GraphQL API queries
526528

0 commit comments

Comments
 (0)