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  

WebRequest.GetBodyAsContainer

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

Parameters

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

Result

Returns container value or error.

Description

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

Examples

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

💬 Ask a question or report a problem