Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Sets mode flags.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebHook | 11.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
WebHook | The reference number of the web hook. | $webhook |
Mode | The new mode. | 1+2 |
Returns OK or error.
Create web hook with keep connection:
If [ IsEmpty ( $$WebHooks ) ]
Set Variable [ $$WebHooks ; Value: MBS("WebHook.Create") ]
#
# enable keep open and disable auto answer, so we can send custom answer
Set Variable [ $r ; Value: MBS("WebHook.SetAutoAnswer"; $$Webhooks; ""; "UTF-8") ]
Set Variable [ $r ; Value: MBS("WebHook.SetMode"; $$WebHooks; 1) ]
#
Set Variable [ $r ; Value: MBS("WebHook.Listen"; $$WebHooks; WebHook::Server Port) ]
Set Variable [ $r ; Value: MBS("WebHook.SetScript"; $$WebHooks; Get(FileName); "WebHookReceived With KeepOpen") ]
Set Field [ WebHook::Server Webhook ; $$WebHooks ]
End If
Start a RAW hook:
If [ IsEmpty ( $$WebHooks ) ]
Set Variable [ $$WebHooks ; Value: MBS("WebHook.Create") ]
#
# enable keep open and disable auto answer, so we can send custom answer
Set Variable [ $r ; Value: MBS("WebHook.SetAutoAnswer"; $$Webhooks; ""; "UTF-8") ]
Set Variable [ $r ; Value: MBS("WebHook.SetMode"; $$WebHooks; 2+1) ]
#
Set Variable [ $r ; Value: MBS("WebHook.Listen"; $$WebHooks; WebHook::Server Port) ]
Set Variable [ $r ; Value: MBS("WebHook.SetScript"; $$WebHooks; Get(FileName); "WebHookReceived With RAW Mode") ]
Set Field [ WebHook::Server Webhook ; $$WebHooks ]
End If
This function checks for a license.
Created 17th October 2021, last changed 18th October 2021