-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'Method' variants for all registered methods.
This commit allow routes to be declared for methods outside of the standard HTTP method set. Specifically, it enables declaring routes for any method in the IANA Method Registry: ```rust #[route(LINK, uri = "/<foo>")] fn link() { ... } #[route("VERSION-CONTROL", uri = "/<foo>")] fn version_control() { ... } ``` The `Method` type has gained variants for each registered method. Breaking changes: - `Method::from_str()` no longer parses mixed-case method names. - `Method` is marked as non-exhaustive. - `Method::supports_payload()` removed in favor of `Method::allows_request_body()`. Resolves #232. # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Wed Apr 24 18:31:39 2024 -0700 # # On branch http-methods # Your branch is ahead of 'origin/http-methods' by 1 commit. # (use "git push" to publish your local commits) # # Changes to be committed: # modified: benchmarks/src/routing.rs # modified: core/codegen/src/attribute/route/parse.rs # modified: core/codegen/src/http_codegen.rs # modified: core/http/src/method.rs # modified: core/lib/src/lifecycle.rs # modified: core/lib/src/request/atomic_method.rs # modified: core/lib/src/request/request.rs # modified: core/lib/src/router/collider.rs # modified: core/lib/src/router/matcher.rs # modified: core/lib/tests/form_method-issue-45.rs # modified: core/lib/tests/http_serde.rs #
- Loading branch information
1 parent
7c50a58
commit 274366e
Showing
11 changed files
with
450 additions
and
206 deletions.
There are no files selected for viewing
This file contains 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 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 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.