Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

JSON

Schemesjson://, jsons://
Cargo featureservice-json
Body formatstext, html, markdown (first is the default)
Attachmentsyes
Title length250 characters
Body length32,768 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

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 json://, jsons://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{host}Hostnamestringyes
{password}Passwordstringnosecret
{port}Portint, 1 to 65535no
{user}Usernamestringno

Query parameters

ParameterMeaningTypeDefaultNotes
methodFetch MethodchoicePOSTone 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):

json://localhost
json://user@localhost
json://localhost/a%20b/c
jsons://user:pass@localhost:8080/path/to/hook
json://localhost/?method=put
json://localhost/?:key%2520a=b%2520c
json://localhost/?+X-Custom=yes&-param=1&:title=subject&:message=&:extra=value

Rejected URLs:

json://localhost/?method=invalid
json://

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'json://localhost'

Notes

JSON webhook (json://, jsons://): posts the notification as a JSON object to any HTTP endpoint.