Add {url:parameter:} placeholder for extracting query parameters
This commit is contained in:
parent
46d5fa2776
commit
c8e2fab4c3
|
@ -55,6 +55,18 @@ class UrlPlaceholder(
|
|||
.let(::io)
|
||||
}
|
||||
|
||||
key.startsWith("url:parameter:", ignoreCase = true) -> {
|
||||
val name = key.substringAfter("url:parameter:")
|
||||
uuu.parameters[name]
|
||||
.let(::io)
|
||||
}
|
||||
|
||||
key.startsWith("base:parameter:", ignoreCase = true) -> {
|
||||
val name = key.substringAfter("base:parameter:")
|
||||
uuu.parameters[name]
|
||||
.let(::io)
|
||||
}
|
||||
|
||||
key.equals("url:userinfo", ignoreCase = true) ||
|
||||
key.equals("base:userinfo", ignoreCase = true) -> {
|
||||
val user = uuu.user.orEmpty()
|
||||
|
|
|
@ -65,6 +65,7 @@ Note: `{base}` supports exactly the same parts as `{url}` and is identical to it
|
|||
| `url:userinfo` | User information: `user:pw` |
|
||||
| `url:username` | Username: `user` |
|
||||
| `url:password` | Password: `pw` |
|
||||
| `url:parameter:q` | Query parameter with a name `q`: `e` |
|
||||
|
||||
#### Text transformation
|
||||
|
||||
|
|
Loading…
Reference in New Issue