Component: WebHook 
-------------------

Functions to catch web hooks.

We run a tiny web server to catch HTTP requests and trigger a script.  
Works even on server with [WebHook.Check](WebHookCheck.md) function. Can be used with TLS if needed or in raw mode without HTTP.

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [11.5](newinversion115.md "First functions introduced with version 11.5.") / [14.4](newinversion144.md "Newest functions in version 14.4.") | ✅ Yes | ✅ Yes | ✅ Yes | ✅ 94% | ✅ Yes |

  
| Item | Details | Server |
|:--|:--|:--|
| [WebHook.Check](WebHookCheck.md)   Checks whether a web hook has been triggered. | All   11.5 | ✅ Server |
| [WebHook.Create](WebHookCreate.md)   Creates a new web hook object. | All   11.5 | ✅ Server |
| [WebHook.GetAutoAnswer](WebHookGetAutoAnswer.md)   Queries auto answer. | All   11.5 | ✅ Server |
| [WebHook.GetCertificateFile](WebHookGetCertificateFile.md)   Queries file path for certificate file. | All   11.5 | ✅ Server |
| [WebHook.GetConnectionCounter](WebHookGetConnectionCounter.md)   Queries number of connections accepted. | All   11.5 | ✅ Server |
| [WebHook.GetFileName](WebHookGetFileName.md)   Queries file name for the trigger script. | All   11.5 | ❌ Server |
| [WebHook.GetMaximumRequestSize](WebHookGetMaximumRequestSize.md)   Queries maximum allowed request size. | All   12.1 | ✅ Server |
| [WebHook.GetMode](WebHookGetMode.md)   Queries keep open flag. | All   11.5 | ✅ Server |
| [WebHook.GetPort](WebHookGetPort.md)   Queries listening port for a web hook. | All   11.5 | ✅ Server |
| [WebHook.GetPrivateKeyFile](WebHookGetPrivateKeyFile.md)   Queries file path for private key file. | All   11.5 | ✅ Server |
| [WebHook.GetSSL](WebHookGetSSL.md)   Whether SSL is enabled. | All   11.5 | ✅ Server |
| [WebHook.GetScriptName](WebHookGetScriptName.md)   Queries script name for the trigger script. | All   11.5 | ❌ Server |
| [WebHook.GetTag](WebHookGetTag.md)   Queries the tag value. | All   14.4 | ✅ Server |
| [WebHook.GetTimeOut](WebHookGetTimeOut.md)   Queries the timeout for the hook. | All   12.0 | ✅ Server |
| [WebHook.GetWebRequestCounter](WebHookGetWebRequestCounter.md)   Queries number of web requests created. | All   11.5 | ✅ Server |
| [WebHook.List](WebHookList.md)   Lists all web hook objects with their reference numbers. | All   11.5 | ✅ Server |
| [WebHook.Listen](WebHookListen.md)   Starts listening for incoming requests on this port. | All   11.5 | ✅ Server |
| [WebHook.Release](WebHookRelease.md)   Releases the object and all memory used for it. | All   11.5 | ✅ Server |
| [WebHook.SetAutoAnswer](WebHookSetAutoAnswer.md)   Sets auto answer text. | All   11.5 | ✅ Server |
| [WebHook.SetMaximumRequestSize](WebHookSetMaximumRequestSize.md)   Sets maximum allowed request size. | All   12.1 | ✅ Server |
| [WebHook.SetMode](WebHookSetMode.md)   Sets mode flags. | All   11.5 | ✅ Server |
| [WebHook.SetSSL](WebHookSetSSL.md)   Sets SSL certificate and key to use. | All   11.5 | ✅ Server |
| [WebHook.SetScript](WebHookSetScript.md)   Sets the script to call when request was received. | All   11.5 | ❌ Server |
| [WebHook.SetTag](WebHookSetTag.md)   Sets the tag value. | All   14.4 | ✅ Server |
| [WebHook.SetTimeOut](WebHookSetTimeOut.md)   Sets the timeout for the hook. | All   12.0 | ✅ Server |
| [WebRequest.GetBody](WebRequestGetBody.md)   Queries body for HTTP request. | All   11.5 | ✅ Server |
| [WebRequest.GetBodyAsContainer](WebRequestGetBodyAsContainer.md)   Queries body for HTTP request as container. | All   11.5 | ✅ Server |
| [WebRequest.GetBodySize](WebRequestGetBodySize.md)   Queries size of body in bytes. | All   12.1 | ✅ Server |
| [WebRequest.GetHTTPMethod](WebRequestGetHTTPMethod.md)   Queries HTTP method for the request. | All   11.5 | ✅ Server |
| [WebRequest.GetHTTPVersion](WebRequestGetHTTPVersion.md)   Queries HTTP method. | All   11.5 | ✅ Server |
| [WebRequest.GetHeaders](WebRequestGetHeaders.md)   Queries HTTP headers as JSON. | All   11.5 | ✅ Server |
| [WebRequest.GetHost](WebRequestGetHost.md)   Queries host name from HTTP headers. | All   11.5 | ✅ Server |
| [WebRequest.GetLocalIP](WebRequestGetLocalIP.md)   Queries local IP for web hook. | All   11.5 | ✅ Server |
| [WebRequest.GetLocalPort](WebRequestGetLocalPort.md)   Queries local port number | All   11.5 | ✅ Server |
| [WebRequest.GetMode](WebRequestGetMode.md)   Queries mode of request. | All   13.0 | ✅ Server |
| [WebRequest.GetRawData](WebRequestGetRawData.md)   Get raw data of full request. | All   11.5 | ✅ Server |
| [WebRequest.GetRemoteIP](WebRequestGetRemoteIP.md)   Queries remote IP address. | All   11.5 | ✅ Server |
| [WebRequest.GetRemotePort](WebRequestGetRemotePort.md)   Queries remote port number. | All   11.5 | ✅ Server |
| [WebRequest.GetSSL](WebRequestGetSSL.md)   Whether this web request comes in with SSL. | All   11.5 | ✅ Server |
| [WebRequest.GetSize](WebRequestGetSize.md)   Queries size of whole request. | All   12.1 | ✅ Server |
| [WebRequest.GetState](WebRequestGetState.md)   Queries the state of the web request. | All   12.0 | ✅ Server |
| [WebRequest.GetTag](WebRequestGetTag.md)   Queries the tag value. | All   14.4 | ✅ Server |
| [WebRequest.GetURL](WebRequestGetURL.md)   Queries HTTP URL received. | All   11.5 | ✅ Server |
| [WebRequest.GetWebHook](WebRequestGetWebHook.md)   Queries the web hook for this web request. | All   11.5 | ✅ Server |
| [WebRequest.List](WebRequestList.md)   Lists all web request objects with their reference numbers. | All   11.5 | ✅ Server |
| [WebRequest.Release](WebRequestRelease.md)   Releases the object and all memory used for it. | All   11.5 | ✅ Server |
| [WebRequest.Send](WebRequestSend.md)   Send custom answer. | All   11.5 | ✅ Server |
| [WebRequest.SetTag](WebRequestSetTag.md)   Sets the tag value. | All   14.4 | ✅ Server |
| [WebRequest.URLComponents](WebRequestURLComponents.md)   Queries parsed URL components. | All   11.5 | ✅ Server |

49 functions shown.

These functions require a license (55%).

### Release notes

- **Version 14.4**
    - Added [WebHook.GetTag](https://www.mbsplugins.eu/WebHookGetTag.shtml), [WebHook.SetTag](https://www.mbsplugins.eu/WebHookSetTag.shtml), [WebRequest.GetTag](https://www.mbsplugins.eu/WebRequestGetTag.shtml) and [WebRequest.SetTag](https://www.mbsplugins.eu/WebRequestSetTag.shtml) functions.
- **Version 13.3**
    - Added password parameter to [WebHook.SetSSL](https://www.mbsplugins.eu/WebHookSetSSL.shtml) function.
- **Version 13.1**
    - Added Queue Length parameter for [WebHook.Listen](https://www.mbsplugins.eu/WebHookListen.shtml) function.
- **Version 12.5**
    - Changed [WebHook.Listen](https://www.mbsplugins.eu/WebHookListen.shtml) to allow passing zero as port number to pick a random port, which you then query via [WebHook.GetPort](https://www.mbsplugins.eu/WebHookGetPort.shtml).
- **Version 12.1**
    - Added [WebHook.GetMaximumRequestSize](https://www.mbsplugins.eu/WebHookGetMaximumRequestSize.shtml) and [WebHook.SetMaximumRequestSize](https://www.mbsplugins.eu/WebHookSetMaximumRequestSize.shtml) functions.
    - Fixed an issue in [WebHook.Listen](https://www.mbsplugins.eu/WebHookListen.shtml) not working on Windows.
- **Version 12.0**
    - Added [WebHook.GetTimeOut](https://www.mbsplugins.eu/WebHookGetTimeOut.shtml) and [WebHook.SetTimeOut](https://www.mbsplugins.eu/WebHookSetTimeOut.shtml) functions.

### Example Databases

- [CURL/Email/GMail oAuth SMTP](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/GMail%20oAuth%20SMTP.shtml#1ScriptAnchor_)
- [CURL/Email/Office 365 oAuth SMTP](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Office%20365%20oAuth%20SMTP.shtml#1ScriptAnchor_)
- [WebHook/Trigger script with Webhook/Trigger script with Webhook](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/Trigger%20script%20with%20Webhook/Trigger%20script%20with%20Webhook.shtml#5ScriptAnchor_)
- [WebHook/Trigger script with Webhook/WebHook Listener](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/Trigger%20script%20with%20Webhook/WebHook%20Listener.shtml#1ScriptAnchor_)
- [WebHook/WebHook Chat/WebHook Chat](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook%20Chat/WebHook%20Chat.shtml#1ScriptAnchor_)
- [WebHook/WebHook to serve html](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook%20to%20serve%20html.shtml#1ScriptAnchor_)
- [WebHook/WebHook](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook.shtml#1ScriptAnchor_)

[HTML Version](component_WebRequest.shtml)