falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.51k stars 937 forks source link

feat(response): add link-extension to append_link() #2055

Closed kaichan1201 closed 2 years ago

kaichan1201 commented 2 years ago

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.

codecov[bot] commented 2 years ago

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.