mirror of
https://github.com/actix/actix-web.git
synced 2024-11-30 13:31:09 +00:00
update route matching guide section
This commit is contained in:
parent
8f2d3a0a76
commit
9a076c69d1
1 changed files with 4 additions and 5 deletions
|
@ -110,11 +110,10 @@ The main purpose of route configuration is to match (or not match) the request's
|
||||||
against a URL path pattern. `path` represents the path portion of the URL that was requested.
|
against a URL path pattern. `path` represents the path portion of the URL that was requested.
|
||||||
|
|
||||||
The way that *actix* does this is very simple. When a request enters the system,
|
The way that *actix* does this is very simple. When a request enters the system,
|
||||||
for each resource configuration registration present in the system, actix checks
|
for each resource configuration declaration present in the system, actix checks
|
||||||
the request's path against the pattern declared. *Regex* crate and it's
|
the request's path against the pattern declared. This checking happens in the order that
|
||||||
[*RegexSet*](https://doc.rust-lang.org/regex/regex/struct.RegexSet.html) is being used for
|
the routes were declared via `Application::resource()` method. If resource could not be found,
|
||||||
pattern matching. If resource could not be found, *default resource* get used as matched
|
*default resource* get used as matched resource.
|
||||||
resource.
|
|
||||||
|
|
||||||
When a route configuration is declared, it may contain route predicate arguments. All route
|
When a route configuration is declared, it may contain route predicate arguments. All route
|
||||||
predicates associated with a route declaration must be `true` for the route configuration to
|
predicates associated with a route declaration must be `true` for the route configuration to
|
||||||
|
|
Loading…
Reference in a new issue