Skip to content

docs(conventions): add Conditional requests and ETag#194

Merged
Mlaz-code merged 1 commit into
mainfrom
docs/etag-conditional-requests
Apr 24, 2026
Merged

docs(conventions): add Conditional requests and ETag#194
Mlaz-code merged 1 commit into
mainfrom
docs/etag-conditional-requests

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Summary

Customer-facing documentation for the ETag + 304 Not Modified support now live on api.sharpapi.io. Pairs with:

  • sharp-api-go#53 — Go-level strong ETag + If-None-Match on hit+miss paths
  • sharp-api-go#55 — nginx proxy_cache_bypass + explicit If-None-Match forwarding

What it covers

New "Conditional requests and ETag" section in /api-reference/conventions, between "Rate limit headers" and "What this is not":

  • Supported endpoints (every cached GET)
  • Strong-ETag semantics (xxhash of body, quoted hex)
  • Example 200 → 304 revalidation flow
  • Wildcard If-None-Match: * matching
  • Cache-Control: private, max-age=0, must-revalidate meaning
  • Tier-scoped ETag caveat (free vs pro ETags won't match across tiers)
  • Client-library hints for automatic handling

Why it matters

Well-behaved API clients can now poll /odds (multi-MB responses) and get a 304 with zero body whenever content hasn't changed. Saves bandwidth and lets integrators poll aggressively without re-downloading stable snapshots.

Documents the ETag + If-None-Match/304 support shipped in
sharp-api-go PR #53 + nginx PR #55. Covers:

- Supported endpoints (every cached GET: odds, events, sportsbooks,
  sports, leagues, markets, teams, opportunities)
- Strong-ETag semantics (xxhash of body, quoted hex)
- Example request/response flow for 200 → 304 revalidation
- Wildcard If-None-Match: * matching
- Cache-Control: private, max-age=0, must-revalidate meaning
- Tier-scoped ETag notes (free vs pro won't cross-match)
- Client-library hints (requests-cache, undici + CacheStore)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.sharpapi.io Ready Ready Preview, Comment Apr 24, 2026 8:04pm

Request Review

@Mlaz-code Mlaz-code merged commit 8a021e2 into main Apr 24, 2026
1 of 2 checks passed
Mlaz-code added a commit that referenced this pull request May 7, 2026
Documents the ETag + If-None-Match/304 support shipped in
sharp-api-go PR #53 + nginx PR #55. Covers:

- Supported endpoints (every cached GET: odds, events, sportsbooks,
  sports, leagues, markets, teams, opportunities)
- Strong-ETag semantics (xxhash of body, quoted hex)
- Example request/response flow for 200 → 304 revalidation
- Wildcard If-None-Match: * matching
- Cache-Control: private, max-age=0, must-revalidate meaning
- Tier-scoped ETag notes (free vs pro won't cross-match)
- Client-library hints (requests-cache, undici + CacheStore)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant