Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Queries body for HTTP request as container.

Component Version macOS Windows Linux Server iOS SDK
WebHook 11.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "WebRequest.GetBodyAsContainer"; WebRequest { ; FileName } )   More


Parameter Description Example Flags
WebRequest The reference number of the web request. $WebRequest
FileName The file name to use for container.
Also defines the type of container value.
We try to get it from the URL usually.
"test.pdf" Optional


Returns container value or error.


Queries body for HTTP request as container.
If the user sent a picture, PDF or other files, you may just query them as container value.

e.g. in Terminal upload a picture to grab it with this function:
curl --upload-file /path/Pictures/cat.jpg -v http://localhost:9999/cat.jpg


Reads body as container:

Set Field [ WebHook::Container ; MBS("WebRequest.GetBodyAsContainer"; $WebRequest) ]

See also

This function is free to use.

Created 24th October 2021, last changed 9th November 2021

WebRequest.GetBody - WebRequest.GetBodySize