Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Response.prototype.type property #3590

Merged
merged 2 commits into from
Feb 24, 2025
Merged

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Feb 22, 2025

WinterTC recently agreed that conformant implementations should, at the very least, support the 'default' value for Response.prototype.type property and, if the runtime implements Response.error(), the 'error' value -- even if the implementation otherwise does not implement CORS.

@jasnell jasnell requested review from a team as code owners February 22, 2025 16:19

This comment was marked as outdated.

@jasnell jasnell requested a review from a team as a code owner February 22, 2025 16:50
@jasnell jasnell force-pushed the jasnell/fetch-response-type branch from cebf528 to ac4b5d8 Compare February 22, 2025 17:49

This comment was marked as outdated.

@jasnell jasnell force-pushed the jasnell/fetch-response-type branch from 307d264 to ca052c4 Compare February 22, 2025 19:07

This comment was marked as outdated.

Copy link

github-actions bot commented Feb 23, 2025

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

WinterTC recently agreed that conformant implementations should, at
the very least, support the `'default'` value for `Response.prototype.type`
property and, if the runtime implements `Response.error()`, the `'error'`
value -- even if the implementation otherwise does not implement CORS.
@jasnell jasnell force-pushed the jasnell/fetch-response-type branch from 75653f2 to 672a70c Compare February 24, 2025 15:32
@jasnell
Copy link
Member Author

jasnell commented Feb 24, 2025

@irvinebroque ... for the changelog entry once this and #3592 are merged and are released: We are adding the Response.prototype.type and Response.error() standard fetch APIs to improve spec compliance and interop between WinterTC-aligned runtimes. The value of Response.prototype.type will always be 'default' unless the Response is created using Response.error(), in which case it will be 'error'.

@jasnell jasnell merged commit 8c8ea21 into main Feb 24, 2025
17 checks passed
@jasnell jasnell deleted the jasnell/fetch-response-type branch February 24, 2025 17:31
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.

2 participants