-
-
Notifications
You must be signed in to change notification settings - Fork 991
feat(routing): override default responders via on_request() #2446
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
400ea5a
feat(routing): override default responders via on_request()
gespyrop 83963a8
feat(routing): on_request() supports suffix
gespyrop d5226d8
Merge branch 'master' into allow-on-request
vytas7 bfe66a0
Merge branch 'master' into allow-on-request
gespyrop 316ab7b
Merge branch 'master' into allow-on-request
vytas7 5bde80c
docs(routing): improve wording + fix a misspelling
vytas7 c49a0c2
docs(routing): Comment for bound methods in tests
gespyrop d7f9814
Merge branch 'master' into allow-on-request
vytas7 54e6d5c
refactor: `allow_on_request` ➡️ `default_to_on_request`
vytas7 4883534
Merge branch 'master' into allow-on-request
vytas7 5ab6358
docs(routing): on_request example and explanation
gespyrop a618a30
fix(routing): Decorate default responders at runtime when default_to_…
gespyrop cebd52f
fix(routing): Unit tests for decorated default responders with suffix
gespyrop a110dce
add newline
gespyrop 4922d15
Merge branch 'master' into allow-on-request
vytas7 bc14286
Merge branch 'master' into allow-on-request
vytas7 34220b0
Merge branch 'master' into allow-on-request
vytas7 2e2f192
Merge branch 'master' into allow-on-request
vytas7 89f4857
Merge branch 'master' into allow-on-request
vytas7 9dc715e
Merge branch 'master' into allow-on-request
vytas7 3f15c97
chore: clean up an incomplete master merge
vytas7 30518a0
docs(routing): misc touchups
vytas7 fe5a230
Merge branch 'master' into allow-on-request
vytas7 e9f458d
Merge branch 'master' into allow-on-request
vytas7 d52b201
fix(routing): Add module attribute for enabling decorating default re…
gespyrop de11a9c
fix(routing): Skip overriding on_websocket with default responders
gespyrop 8c97088
Merge branch 'master' into allow-on-request
vytas7 ef3145e
Merge branch 'master' into allow-on-request
vytas7 845e624
Merge branch 'master' into allow-on-request
vytas7 dd6dbec
Merge branch 'master' into allow-on-request
vytas7 eb171b9
Merge branch 'master' into allow-on-request
vytas7 2f78999
Merge branch 'master' into allow-on-request
vytas7 3a29b18
Merge branch 'master' into allow-on-request
vytas7 fe183a7
Merge branch 'master' into allow-on-request
vytas7 8121694
docs(towncrier): tweak the proposed newsfragment
vytas7 6f64549
refactor: clean up and tweak stuff
vytas7 de280ef
refactor: bikeshed a cls link
vytas7 d9b14dc
refactor(hooks): DRY on_request regex
vytas7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| A new router option, :attr:`~.CompiledRouterOptions.default_to_on_request`, was | ||
| added for providing a default responder by implementing ``on_request()`` on | ||
| resources (the new option is disabled by default). When enabled, | ||
| ``on_request()`` is used as the default responder for every unimplemented HTTP | ||
| verb except ``on_options()`` (and the special ``on_websocket`` handler). | ||
|
|
||
| When the option is disabled, or the ``on_request()`` method is not implemented, | ||
| the default responder for | ||
| :class:`"405 Method Not Allowed" <falcon.HTTPMethodNotAllowed>` is used. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.