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 header accessors #2696

Merged
merged 3 commits into from
Feb 27, 2023
Merged

Add header accessors #2696

merged 3 commits into from
Feb 27, 2023

Conversation

ahopkins
Copy link
Member

This PR adds a single accessor to get all headers in a concatenated string of all values.

Example-Field: Foo, Bar
Example-Field: Baz
request.headers.example_field == "Foo, Bar,Baz"

Accessors will translate _ to -, and will ignore a trailing _.

@ahopkins ahopkins requested a review from a team as a code owner February 26, 2023 21:55
sanic/compat.py Outdated Show resolved Hide resolved
@ahopkins ahopkins requested review from Tronic and a team February 27, 2023 21:30
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Base: 88.720% // Head: 88.720% // No change to project coverage 👍

Coverage data is based on head (a927f45) compared to base (dfc0704).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2696   +/-   ##
=========================================
  Coverage   88.720%   88.720%           
=========================================
  Files           87        87           
  Lines         6853      6853           
  Branches      1177      1177           
=========================================
  Hits          6080      6080           
  Misses         532       532           
  Partials       241       241           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ahopkins ahopkins merged commit cb49c2b into main Feb 27, 2023
@ahopkins ahopkins deleted the issue2692 branch February 27, 2023 22:26
@ahopkins ahopkins restored the issue2692 branch March 1, 2023 20:01
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