Generic
The Generic service can be used for any target that is not explicitly supported by Mission Control, as long as it supports receiving the message via a POST request. Usually, this requires customization on the receiving end to interpret the payload that it receives, and might not be a viable approach.
URL Fields
Field | Description | Scheme |
---|---|---|
contentType | The value of the Content-Type header. Defaults to |
|
disableTLS | . Defaults to |
|
host |
| |
messageKey | The key that will be used for the message value. Defaults to |
|
path |
| |
port |
| |
requestMethod | . Defaults to |
|
template | The template used for creating the request payload |
|
title |
| |
titleKey | The key that will be used for the title value. Defaults to |
|
Custom headers
You can add additional HTTP headers to your request by adding query variables prefixed with @
(@key=value
).
Using
generic://example.com?@acceptLanguage=tlh-Piqd
would result in the additional header being added:
Accept-Language: tlh-Piqd
JSON template
By using the built in JSON
template (template=json
) you can create a generic JSON payload. The keys used for title
and message
can be overriden
by supplying the params/query values titleKey
and messageKey
.
!!! example
{
"title": "Oh no!",
"message": "The thing happened and now there is stuff all over the area!"
}
Custom data fields
When using the JSON template, you can add additional key/value pairs to the JSON object by adding query variables prefixed with $
($key=value
).
Using generic://example.com?$projection=retroazimuthal
would yield:
{
"title": "Amazing opportunities!",
"message": "New map book available for purchase.",
"projection": "retroazimuthal"
}
Shortcut URL
You can just add generic+
as a prefix to your target URL to use it with the generic service, so
https://example.com/api/v1/postStuff
would become
generic+https://example.com/api/v1/postStuff
Any query variables added to the URL will be escaped so that they can be forwarded to the remote server. That means that you cannot use ?template=json
with the generic+https://
, just use generic://
instead!