mirror of
https://github.com/metosin/reitit.git
synced 2026-02-02 18:50:35 +00:00
Update docs
This commit is contained in:
parent
f547576a44
commit
f793a224c7
1 changed files with 11 additions and 0 deletions
|
|
@ -64,6 +64,17 @@ With provided path-parameters:
|
||||||
; :path-params {:id "1"}}
|
; :path-params {:id "1"}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Path-parameters are automatically coerced into strings, with the help of (currently internal) Protocol `reitit.impl/IntoString`. It supports numbers, booleans, keywords and objects:
|
||||||
|
|
||||||
|
```clj
|
||||||
|
(r/match-by-name router ::user {:id 1})
|
||||||
|
; #Match{:template "/api/user/:id"
|
||||||
|
; :data {:name :user/user}
|
||||||
|
; :path "/api/user/1"
|
||||||
|
; :result nil
|
||||||
|
; :path-params {:id "1"}}
|
||||||
|
```
|
||||||
|
|
||||||
There is also a exception throwing version:
|
There is also a exception throwing version:
|
||||||
|
|
||||||
```clj
|
```clj
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue