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: 11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3    Statistic    FMM    Blog  


Sets maximum allowed request size.

Component Version macOS Windows Linux Server iOS SDK License
WebHook 12.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes Paid
MBS( "WebHook.SetMaximumRequestSize"; WebHook; MaxBytes )   More


Parameter Description Example
WebHook The reference number of the web hook. $webhook
MaxBytes The allowed maximum value.
Can be 0 for no limit.


Returns OK or error.


Sets maximum allowed request size.
This allows you to disconnect sockets, which send too much data.
By default there is no limit, so people can send requests with giga byte big payload.
Depending on your use can it may be worth to limit request size to a reasonable value.

For example if you receive notifications from your phone system, you may set the maximum size to 10000 bytes and a timeout of 60 seconds for WebHook.SetTimeOut function. That is probably 10 times more than needed, but may avoid some malicious user from sending a ton of useless traffic.

The check is performed after we check HTTP requests, so if a request comes quickly, it may skip the limit check. If you test this on localhost, you need to e.g. use --limit-rate with curl command line tool to slow down your request. This is not an issue over a regular network with latency.

See also

Release notes

Blog Entries

Created 20th February 2022, last changed 20th February 2022

WebHook.SetAutoAnswer - WebHook.SetMode

Feedback: Report problem or ask question.

Start Chat