mirror of
https://github.com/adnanh/webhook.git
synced 2026-07-22 09:48:14 +00:00
feat: Add default value support for parameters
This commit is contained in:
parent
7ea2a53bbb
commit
6b2bc6b78f
3 changed files with 93 additions and 57 deletions
|
|
@ -111,6 +111,16 @@ If you are referencing values for environment, you can use `envname` property to
|
|||
```
|
||||
to get the QUERY environment variable set to the `q` parameter passed in the query string.
|
||||
|
||||
If you need a default value, you can use `default` property to set a value used in case the value is not found or is empty like so
|
||||
```json
|
||||
{
|
||||
"source": "url",
|
||||
"name": "q",
|
||||
"default": "123"
|
||||
}
|
||||
```
|
||||
**Note**: The `default` property is ignored when the `source` is set to `string`, `entire-payload`, `entire-headers` or `entire-query`.
|
||||
|
||||
# Special cases
|
||||
If you want to pass the entire payload as JSON string to your command you can use
|
||||
```json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue