-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebreaking changeWill break existing deployments when updated without changesWill break existing deployments when updated without changesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Description
Summary
Replace custom request context objects with the standard web Headers API for better standards alignment and developer familiarity.
This was identified as a gap in the v2 wishlist (issue #809) that is not yet tracked as a separate issue.
Motivation
- Standards alignment: The
HeadersAPI is a web standard that developers already know - Interoperability: Standard APIs work better across different runtimes (Node.js, Deno, Bun, browsers)
- Developer experience: Familiar API reduces learning curve
- Type safety:
Headershas well-defined TypeScript types
Requirements
- Replace custom header/context objects with standard
HeadersAPI - Update request context interfaces to use
Headers - Ensure compatibility with Node.js, Deno, Bun runtimes
- Provide migration guidance for existing code
API Changes
// Before (custom object)
interface RequestContext {
headers: Record<string, string>;
// ...
}
// After (standard Headers)
interface RequestContext {
headers: Headers;
// ...
}Related Issues
- SDK V2 #809 (SDK V2 wishlist)
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebreaking changeWill break existing deployments when updated without changesWill break existing deployments when updated without changesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes