Skip to content

Enhance REST API documentation with conditional requests#43138

Open
JustinGrote wants to merge 1 commit intogithub:mainfrom
JustinGrote:patch-2
Open

Enhance REST API documentation with conditional requests#43138
JustinGrote wants to merge 1 commit intogithub:mainfrom
JustinGrote:patch-2

Conversation

@JustinGrote
Copy link
Contributor

Added information about conditional requests in the REST API.

Why:

Closes:

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

Added information about conditional requests in the REST API.
Copilot AI review requested due to automatic review settings February 26, 2026 01:09
@welcome
Copy link

welcome bot commented Feb 26, 2026

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions
Copy link
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
rest/about-the-rest-api/comparing-githubs-rest-api-and-graphql-api.md fpt
ghec
ghes@ 3.20 3.19 3.18 3.17 3.16 3.15 3.14
fpt
ghec
ghes@ 3.20 3.19 3.18 3.17 3.16 3.15 3.14

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Feb 26, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds documentation about conditional requests to the REST API comparison article. The change highlights a key feature of the REST API that can help developers optimize their API usage and avoid rate limit charges by using HTTP caching headers.

Changes:

  • Added a new paragraph explaining conditional requests in the REST API, including the use of etag and If-Modified-Since headers with a link to best practices documentation

}
```

The REST API also has the concept of conditional requests, which allow you to use ETAG and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header name should be lowercase "etag" not uppercase "ETAG" to match HTTP header conventions and the consistent usage throughout the documentation (see the linked article at line 72 and other REST API documentation).

Suggested change
The REST API also has the concept of conditional requests, which allow you to use ETAG and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)
The REST API also has the concept of conditional requests, which allow you to use etag and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)

Copilot uses AI. Check for mistakes.
}
```

The REST API also has the concept of conditional requests, which allow you to use ETAG and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header name "If-None-Modified" is incorrect. The correct HTTP header name is "If-Modified-Since". The linked article confirms this uses "if-modified-since" as the proper header name.

Suggested change
The REST API also has the concept of conditional requests, which allow you to use ETAG and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)
The REST API also has the concept of conditional requests, which allow you to use ETag and If-Modified-Since headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)

Copilot uses AI. Check for mistakes.
}
```

The REST API also has the concept of conditional requests, which allow you to use ETAG and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The abbreviation "info" should be spelled out as "information" to match the style used consistently throughout this file and the documentation. See lines 24 and 26 of this file which use "For more information" in similar contexts.

Suggested change
The REST API also has the concept of conditional requests, which allow you to use ETAG and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more info, see: [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate)
The REST API also has the concept of conditional requests, which allow you to use ETAG and If-None-Modified headers to observe if the previous query has changed without incurring a rate limit query charge. For more information, see [AUTOTITLE](/rest/using-the-rest-api/best-practices-for-using-the-rest-api#use-conditional-requests-if-appropriate).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants