falcon
falcon copied to clipboard
feat(response): add link-extension to append_link()
Summary of Changes
This PR adds link-extension to append_link() as specified in RFC 8288 Sec. 3.4.2. From my understanding, there is not any restriction on what the extension attributes could be, so I implement this feature in the most intuitive way: having the user pass in pairs of (parameter, value) and concatenate them onto the header.
Related Issues
Closes #288
Pull Request Checklist
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.
- [x] Applied changes to both WSGI and ASGI code paths and interfaces (where applicable).
- [x] Added tests for changed code.
- [x] Prefixed code comments with GitHub nick and an appropriate prefix.
- [x] Coding style is consistent with the rest of the framework.
- [x] Updated documentation for changed code.
- [x] Added docstrings for any new classes, functions, or modules.
- [x] Updated docstrings for any modifications to existing code.
- [x] Updated both WSGI and ASGI docs (where applicable).
- [x] Added references to new classes, functions, or modules to the relevant RST file under
docs/
. - [x] Updated all relevant supporting documentation files under
docs/
. - [x] A copyright notice is included at the top of any new modules (using your own name or the name of your organization).
- [x] Changed/added classes/methods/functions have appropriate
versionadded
,versionchanged
, ordeprecated
directives.
- [x] Changes (and possible deprecations) have towncrier news fragments under
docs/_newsfragments/
, with the file name format{issue_number}.{fragment_type}.rst
. (Runtowncrier --draft
to ensure it renders correctly.)
Codecov Report
Merging #2055 (5c8e64f) into master (05d11a3) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #2055 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 62 62
Lines 6743 6746 +3
Branches 1253 1255 +2
=========================================
+ Hits 6743 6746 +3
Impacted Files | Coverage Δ | |
---|---|---|
falcon/response.py | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.