Skip to content

feat: Add HeaderExt trait #166

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tottoto
Copy link
Contributor

@tottoto tottoto commented Jan 27, 2024

Adds a helper method which encodes Header types to HeaderValue as HeaderExt trait. This would be useful as it is a frequently encountered procedure.

Copy link

@GlenDC GlenDC left a comment

Choose a reason for hiding this comment

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

LGTM.

That said, I know it would be a breaking change, but honestly, why is this not directly in the trait? It would mean that the Header::encode method could be optional, and only to be implemented if the default logic of inserting the encoded header value would not be desired?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants