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.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Send custom answer.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebHook | 11.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
WebRequest | The reference number of the web request. | $WebRequest | |
Text | The text to send out. Should use CRLF as line endings and end with two CRLF. |
||
Encoding | The text encoding for result. Default is UTF-8. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
"UTF8" | Optional |
Returns number or error.
Send HTTP response:
Set Variable [ $text ; Value: "HTTP/1.1 201 Tested¶Server: MyServer 1.0¶Connection: close¶Content-Length: 0¶¶" ]
Set Variable [ $text ; Value: MBS( "Text.ReplaceNewline"; $Text; 3 ) ]
Set Variable [ $r ; Value: MBS("WebRequest.Send"; $WebRequest; $text; "UTF-8") ]
Send RAW answer:
Set Variable [ $text ; Value: "Hello World!" & Char(13) & Char(10) ]
Set Variable [ $r ; Value: MBS("WebRequest.Send"; $WebRequest; $text; "UTF-8") ]
This function checks for a license.
Created 17th October 2021, last changed 5th November 2021