WebRequest.GetMode
------------------

Queries mode of request.

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

MBS( "WebRequest.GetMode"; WebRequest ) 

**MBS**( **"WebRequest.GetMode";** /\* Queries mode of request. \*/  
**$WebRequest**) /\* The reference number of the web request. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WebRequest | The reference number of the web request. | $WebRequest |

### Result

Returns number or error.

### Description

Queries mode of request.  
Returns the mode of the webhook applied to the request.  
  
| Value | Description |
|---|---|
| 0 | Answer was sent and connection is closed. |
| 1 | The connection is kept open after receiving a HTTP request and you can send an answer yourself. |
| 2 | This is a RAW request and the answer was sent. |
| 3 | The connection is kept open after receiving a RAW request and you can send an answer yourself. |

### See also

- [WebRequest.GetBody](WebRequestGetBody.md)
- [WebRequest.GetHeaders](WebRequestGetHeaders.md)
- [WebRequest.GetHost](WebRequestGetHost.md)
- [WebRequest.GetSize](WebRequestGetSize.md)
- [WebRequest.GetSSL](WebRequestGetSSL.md)
- [WebRequest.GetState](WebRequestGetState.md)
- [WebRequest.GetTag](WebRequestGetTag.md)
- [WebRequest.GetURL](WebRequestGetURL.md)
- [WebRequest.Release](WebRequestRelease.md)
- [WebRequest.SetTag](WebRequestSetTag.md)

### Release notes

- **Version 13.0**
    - Added [WebRequest.GetMode](https://www.mbsplugins.eu/WebRequestGetMode.shtml) function.

### Blog Entries

- [New in MBS FileMaker Plugin 13.0](https://www.mbsplugins.de/archive/2023-01-24/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.6pr2](https://www.mbsplugins.de/archive/2022-12-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 2nd December 2022 , last changed 2nd December 2022

  
[WebRequest.GetLocalPort](WebRequestGetLocalPort.md) - [WebRequest.GetRawData](WebRequestGetRawData.md)

[HTML Version](WebRequestGetMode.shtml)