From 9e8abbf26d4422ba133bba7186363bee5b1f38d7 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Wed, 5 Oct 2022 22:29:03 +0300 Subject: 1.3.0 --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 21e70ba..5384ea8 100644 --- a/README.md +++ b/README.md @@ -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. -- cgit v1.2.3