diff options
| author | Asko Nõmm <ano@ano.ee> | 2022-10-05 22:29:03 +0300 |
|---|---|---|
| committer | Asko Nõmm <ano@ano.ee> | 2022-10-05 22:29:03 +0300 |
| commit | 9e8abbf26d4422ba133bba7186363bee5b1f38d7 (patch) | |
| tree | 152702f0d75313eb26a6b2d79b7f208ac039e399 /README.md | |
| parent | 78659212f95cac827efc816dfbdab8181c25fc3d (diff) | |
1.3.0
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -122,6 +122,10 @@ To create parameters from the path, prepend a colon (:) in front of a path slice Additionally, you may want to use an optional parameter, in which case you'd want to add a question mark to the end of it, like `/hi/:name?`, which will match the `\/hi\/?.*?` regex, meaning that the previous forward slash is optional, and what comes after that is also optional. +##### Wildcard matching + +The above-mentioned `:name` and `:name?` only match in its own sequence, e.g inside a space of two slashes. They cannot, by design, match the whole URL path. If you need wildcard matching, instead use `:name*`, which will match everything, including forward slashes. + #### `:method` The HTTP method to listen for when matching the given path. This can be whatever the HTTP server uses. For example, if you're using http-kit for the HTTP server then the accepted values are: @@ -157,6 +161,11 @@ What the actual map can contain that you return depends again on the HTTP server ## Changelog +### 1.3.0 + +- Fixed an issue with optional parameters not matching correctly when there were multiple optional paremeters in use. +- Implemented wildcard parameters in the form of `:name*`, which will match everything including forward slashes. + ### 1.2.2 - Fixed an issue where CLJS compilation would fail because of the `(:gen-class)` that is JVM-only. |
