WebRequest.GetLocalPort
-----------------------

Queries local port number

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

MBS( "WebRequest.GetLocalPort"; WebRequest ) 

**MBS**( **"WebRequest.GetLocalPort";** /\* Queries local port number \*/  
**$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 local port number  
### Examples

Queries local IP and port:

 Set Field \[ WebHook::Local IP ; MBS ("[WebRequest.GetLocalIP](WebRequestGetLocalIP.md)"; $WebRequest ) \]   
Set Field \[ WebHook::Local Port ; MBS ("WebRequest.GetLocalPort"; $WebRequest ) \]  
### See also

- [WebRequest.GetLocalIP](WebRequestGetLocalIP.md)
- [WebRequest.GetRemotePort](WebRequestGetRemotePort.md)

### Example Databases

- [WebHook/WebHook](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook.shtml#2ScriptAnchor_)

This function is free to use.

Created 13th October 2021 , last changed 25th October 2021

  
[WebRequest.GetLocalIP](WebRequestGetLocalIP.md) - [WebRequest.GetMode](WebRequestGetMode.md)

[HTML Version](WebRequestGetLocalPort.shtml)