mirror of https://github.com/rwf2/Rocket.git
72c91958b7
This commit introduces support for method-less routes and route attributes, which match _any_ valid method: `#[route("/")]`. The `Route` structure's `method` field is now accordingly of type `Option<Route>`. The syntax for the `route` attribute has changed in a breaking manner. To set a method, a key/value of `method = NAME` must be introduced: ```rust #[route("/", method = GET)] ``` If the method's name is a valid identifier, it can be used without quotes. Otherwise it must be quoted: ```rust // `GET` is a valid identifier, but `VERSION-CONTROL` is not #[route("/", method = "VERSION-CONTROL")] ``` Closes #2731. |
||
---|---|---|
.. | ||
ui-fail | ||
ui-fail-nightly | ||
ui-fail-stable | ||
async-entry.rs | ||
async-routes.rs | ||
catcher.rs | ||
expansion.rs | ||
from_form.rs | ||
from_form_field.rs | ||
from_param.rs | ||
responder.rs | ||
route-data.rs | ||
route-format.rs | ||
route-ranking.rs | ||
route-raw.rs | ||
route-uniqueness.rs | ||
route.rs | ||
segment-ignore.rs | ||
typed-uris.rs | ||
ui-fail.rs | ||
uri_display.rs |