Updated Notify_Custom_Form (markdown)

Chris Caron 2023-02-17 16:36:45 -05:00
parent 544e81bc9a
commit 55d148abb3

@ -35,7 +35,8 @@ The secure versions:
| port | No | The port our Web server is listening on. By default the port is **80** for **form://** and **443** for all **forms://** references.
| user | No | If you're system is set up to use HTTP-AUTH, you can provide _username_ for authentication to it.
| password | No | If you're system is set up to use HTTP-AUTH, you can provide _password_ for authentication to it.
| method | No | Optionally specify the server http method; possible options are `post`, `put`, `get`, `delete`, and `head`. By default if no method is specified then `post` is used.
| method | No | Optionally specify the server http method; possible options are `post`, `put`, `get`, `delete`, `patch`, and `head`. By default if no method is specified then `post` is used.
| attach-as | No | Optionally override the meta filename set when there are attachments. Each attachment by default gets posted as `file01`, `file02`, etc. There have been use-cases where someone's end point expects the meta name (where the file is found on the HTTP request) to be named something specific such as `document`. Utilize this over-ride to accomplish such a feat. Also use the `*` character to allow the numbering. Hence `?attach-as=meta*` would cause Apprise to store the files as `meta01`, `meta02`, etc.
**Note:**: If you include file attachments; each one is concatenated into the same single post to the upstream server. The `Content-Type` header request also changes from `application/x-www-form-urlencoded` to `multipart/form-data` in this case.
@ -97,4 +98,29 @@ apprise -vv -t "Test Message Title" -b "Test Message Body" \
#
apprise -vv -t "Test Message Title" -b "Test Message Body" \
"forms://example.ca/my/path?-key1=value1&-key2=value2"
```
### Attach-As Over-Ride Options
This section expands further on the `?attach-as=` override option.
Simply add this to the URL: such as:
```bash
# apply the override of `file{:02d}` to be `document`
bin/apprise -vvvv 'forms://webhook.site/<webhook>?attach-as=document' \
--attach test/var/apprise-test.png -b test
```
In order to support other variations, you can do :
```bash
# Set the file array object in the request as `{:02d}meta`
bin/apprise -vvvv 'forms://webhook.site/<webhook>?attach-as=*meta' \
--attach test/var/apprise-test.png -b test
# Set the file array object in the request as `meta{:02d}`
bin/apprise -vvvv 'forms://webhook.site/<webhook>?attach-as=meta*' \
--attach test/var/apprise-test.png -b test
# Set the file array object in the request as `meta{:02d}file`
bin/apprise -vvvv 'forms://webhook.site/<webhook>?attach-as=meta*file' \
--attach test/var/apprise-test.png -b test
```