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

feat(http/box): BoxBody::empty() creates an empty body #3468

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

cratelyn
Copy link
Collaborator

hyper 0.14's body type provides an empty() method that can be used to construct an empty request or response body.

this commit proposes an equivalent method for BoxBody. while it is semantically equivalent to BoxBody::default(), it can be helpful to clarify that this constructs an empty body.

https://docs.rs/hyper/0.14.31/hyper/body/struct.Body.html#method.empty

see linkerd/linkerd2#8733.

hyper 0.14's body type provides an `empty()` method that can be used to
construct an empty request or response body.

this commit proposes an equivalent method for `BoxBody`. while it is
semantically equivalent to `BoxBody::default()`, it can be helpful to
clarify that this constructs an empty body.

<https://docs.rs/hyper/0.14.31/hyper/body/struct.Body.html#method.empty>

Signed-off-by: katelyn martin <[email protected]>
@cratelyn
Copy link
Collaborator Author

🎉 i'm going to merge this, since it'll conflict with addressing review feedback in #3467...

@cratelyn cratelyn merged commit 35e7316 into main Dec 17, 2024
15 checks passed
@cratelyn cratelyn deleted the kate/hyper-1.x-box-body-empty branch December 17, 2024 18:27
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