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 encodeBody and cf to ResponseInit. Adopt builder pattern. #568

Merged
merged 5 commits into from May 19, 2024

Conversation

kflansburg
Copy link
Member

This expands ResponseInit to support all of the options available in JavaScript. Additionally, the builder pattern is adopted so that users do not have to specify all of these new fields as we add them (breaking change). There are a few questions I want to answer before merging this.

Closes #567

worker/src/response.rs Show resolved Hide resolved
worker/src/response.rs Outdated Show resolved Hide resolved
@kflansburg kflansburg requested a review from zebp May 4, 2024 12:47
worker/src/response.rs Outdated Show resolved Hide resolved
worker/src/response.rs Outdated Show resolved Hide resolved
@@ -2,7 +2,7 @@ use super::SomeSharedData;
use futures_util::stream::StreamExt;
Copy link
Member Author

Choose a reason for hiding this comment

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

These changes to the other files aren't necessary (there are no breaking changes to Response), but are done to adopt the new builder pattern.

worker-sys/src/ext/response_init.rs Outdated Show resolved Hide resolved
worker/src/response.rs Outdated Show resolved Hide resolved
worker/src/response.rs Outdated Show resolved Hide resolved
@kflansburg kflansburg requested a review from himikof May 16, 2024 11:19
@kflansburg kflansburg merged commit bfe6d56 into main May 19, 2024
3 checks passed
@kflansburg kflansburg deleted the kflansburg/response-init branch May 19, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants