Skip to content

Commit 017ecf0

Browse files
committed
docs: update routeBind use
1 parent 1b89b8f commit 017ecf0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

DOCUMENTATION.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ let webApp =
11751175
]
11761176
```
11771177

1178-
The `routeBind<'T>` http handler can also contain valid `Regex` code to match a variety of different routes.
1178+
The `routeBind<'T>` http handler from the `Giraffe.Routing` module can also contain valid `Regex` code to match a variety of different routes.
11791179

11801180
For example by definition (according to the spec) a route with a trailing slash **is not** the same as the equivalent route without a trailing slash. Therefore it is perfectly valid if a web server doesn't serve (or serves a different response) for the following two routes:
11811181

@@ -1214,6 +1214,8 @@ routeBind<Blah> "/p/{foo}/{bar}(/*)" blahHandler
12141214

12151215
For a complete list of valid `Regex` codes please visit the official [Regular Expression Language Reference](https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference).
12161216

1217+
In case you are using `Giraffe.EndpointRouting`, the request path is handled by ASP.NET Core’s Endpoint Routing infrastructure. We therefore recommend reviewing the following sections of the official documentation: [url matching](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-10.0#url-matching) and [route constraints](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-10.0#route-constraints).
1218+
12171219
#### routeStartsWith
12181220

12191221
Sometimes it can be useful to pre-filter a route in order to enable certain functionality which should only be applied to a specific collection of routes.

0 commit comments

Comments
 (0)