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(headers): support array values for multi-field headers #627

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GalacticHypernova
Copy link
Contributor

πŸ”— Linked issue

Related to #625

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR adds a way to provide header values in arrays, which could be beneficial for headers that can accept multiple values (example: Accept). This PR will also make it much easier to implement #625 typing wise.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@GalacticHypernova GalacticHypernova marked this pull request as draft January 21, 2024 20:55
Copy link

codecov bot commented Jan 21, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (8345c1f) 77.80% compared to head (7ebfee5) 77.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #627      +/-   ##
==========================================
+ Coverage   77.80%   77.85%   +0.04%     
==========================================
  Files          47       47              
  Lines        4281     4290       +9     
  Branches      610      610              
==========================================
+ Hits         3331     3340       +9     
  Misses        933      933              
  Partials       17       17              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@GalacticHypernova GalacticHypernova marked this pull request as ready for review January 21, 2024 21:02
@GalacticHypernova
Copy link
Contributor Author

On second thought, this should probably be reworked to include semicolon separated headers, and perhaps create a helper function to determine what to separate by. I'm just worried about the performance side of it. Would love to hear your implementation suggestions!

@GalacticHypernova GalacticHypernova marked this pull request as draft January 22, 2024 05:55
@GalacticHypernova
Copy link
Contributor Author

Seeing as this is already supported by the underlying http lib I will keep this a draft until I find out it works fine. If it doesn't I will likely mark this as ready to review, is that fine?

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.

None yet

1 participant