WebRequest.GetBody
------------------

Queries body for HTTP request.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebHook](component_WebHook.md) | [11.5](newinversion115.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "WebRequest.GetBody"; WebRequest { ; Encoding } ) 

**MBS**( **"WebRequest.GetBody";** /\* Queries body for HTTP request. \*/  
**$WebRequest**; /\* The reference number of the web request. \*/   
**$Encoding**) /\* Optional; The text encoding for result.   
Default is UTF-8.e.g. "UTF8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| WebRequest | The reference number of the web request. | $WebRequest |  |
| 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](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "UTF8" | Optional |

### Result

Returns text or error.

### Description

Queries body for HTTP request.  
### Examples

Query body:

 Set Field \[ WebHook::Body ; MBS ("WebRequest.GetBody"; $WebRequest ; "UTF-8") \]  
### See also

- [WebRequest.GetBodyAsContainer](WebRequestGetBodyAsContainer.md)
- [WebRequest.GetBodySize](WebRequestGetBodySize.md)
- [WebRequest.GetHost](WebRequestGetHost.md)
- [WebRequest.GetMode](WebRequestGetMode.md)
- [WebRequest.GetSize](WebRequestGetSize.md)
- [WebRequest.GetSSL](WebRequestGetSSL.md)
- [WebRequest.GetState](WebRequestGetState.md)
- [WebRequest.GetTag](WebRequestGetTag.md)
- [WebRequest.GetURL](WebRequestGetURL.md)
- [WebRequest.SetTag](WebRequestSetTag.md)

### Release notes

- **Version 12.1**
    - Added [WebRequest.GetBodySize](https://www.mbsplugins.eu/WebRequestGetBodySize.shtml) and [WebRequest.GetSize](https://www.mbsplugins.eu/WebRequestGetSize.shtml) functions.

### Example Databases

- [WebHook/Trigger script with Webhook/WebHook Listener](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/Trigger%20script%20with%20Webhook/WebHook%20Listener.shtml#3ScriptAnchor_)
- [WebHook/WebHook Chat/WebHook Chat](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook%20Chat/WebHook%20Chat.shtml#3ScriptAnchor_)
- [WebHook/WebHook](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook.shtml#2ScriptAnchor_)

### Blog Entries

- [Trigger Scripts via WebHook](https://www.mbsplugins.de/archive/2022-12-08/Trigger_Scripts_via_WebHook/monkeybreadsoftware_blog_filemaker)
- [WebHook Introduction](https://www.mbsplugins.de/archive/2021-10-28/WebHook_Introduction/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[WebPolicyDelegate.RemoveMimeType](WebPolicyDelegateRemoveMimeType.md) - [WebRequest.GetBodyAsContainer](WebRequestGetBodyAsContainer.md)

[HTML Version](WebRequestGetBody.shtml)