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 HTTP::Headers#serialize #12765

Conversation

straight-shoota
Copy link
Member

This method serializes the headers in the format used in HTTP. The implementation already existed in HTTP.serialize_headers, this just moves it to HTTP::Headers. That's a more fitting place. It's easier to find and use.

As a consequence HTTP.serialize_headers gets deprecated.

@asterite
Copy link
Member

An http request has a method to_io to serialize its data. I wonder if we should eventually unify those names. Serialize is probably better than to_io. Alternative we could try to come up with a more descriptive name.

@straight-shoota straight-shoota self-assigned this Dec 8, 2022
Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

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

Thank you @straight-shoota 🙏

@straight-shoota straight-shoota added this to the 1.7.0 milestone Dec 22, 2022
@straight-shoota straight-shoota merged commit c4fe774 into crystal-lang:master Dec 23, 2022
@straight-shoota straight-shoota deleted the feature/http_headers-serialize branch December 23, 2022 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants