Form
| Schemes | form://, forms:// |
| Cargo feature | service-form |
| Body formats | text, html, markdown (first is the default) |
| Attachments | yes |
| Title length | 250 characters |
| Body length | 32,768 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://{host}
{schema}://{host}:{port}
{schema}://{user}@{host}
{schema}://{user}@{host}:{port}
{schema}://{user}:{password}@{host}
{schema}://{user}:{password}@{host}:{port}
{schema} is one of form://, forms://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{host} | Hostname | string | yes | ||
{password} | Password | string | no | secret | |
{port} | Port | int, 1 to 65535 | no | ||
{user} | Username | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
attach-as | Attach File As | string | file* | |
method | Fetch Method | choice | POST | one of POST, GET, DELETE, PUT, HEAD, PATCH, UPDATE, OPTIONS |
Prefixed parameters:
+name=value: HTTP Header-name=value: GET Params:name=value: Payload Extras
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
form://localhost
forms://user:pass@localhost:8080/path/to/hook
form://localhost/?method=delete
form://localhost?attach-as=meta
form://localhost/?method=GET&-p=1
form://localhost/?+X-Custom=yes&-param=1&:title=subject&:message=&:extra=value
Rejected URLs:
form://localhost/?method=invalid
form://localhost?attach-as=!!!
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'form://localhost'
Notes
Form webhook (form://, forms://): posts the notification as form fields (or multipart with attachments) to any HTTP endpoint.