CURL.SetOptionProtocols
-----------------------

Limit which protocols are used.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md). Use [CURL.SetOptionProtocolsString](CURLSetOptionProtocolsString.md) instead.

MBS( "CURL.SetOptionProtocols"; curl; Value ) 

**MBS**( **"CURL.SetOptionProtocols";** /\* Limit which protocols are used. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The bitmask defining which protocols to use.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The bitmask defining which protocols to use. | 1 |

### Result

Returns "OK" on success.

### Description

Limit which protocols are used.  
Pass a number that holds a bitmask of protocol values (See below). If used, this bitmask limits what protocols libcurl may use in the transfer. This allows us to have a plugin built to support a wide range of protocols but still limit specific transfers to only be allowed to use a subset of them. By default libcurl will accept all protocols it supports. See also [CURL.SetOptionRedirProtocols](CURLSetOptionRedirProtocols.md).  
  
| HTTP | 1 |
|---|--:|
| HTTPS | 2 |
| FTP | 4 |
| FTPS | 8 |
| SCP | 16 |
| SFTP | 32 |
| TELNET | 64 |
| LDAP | 128 |
| LDAPS | 256 |
| DICT | 512 |
| FILE | 1024 |
| TFTP | 2048 |
| IMAP | 4096 |
| IMAPS | 8192 |
| POP3 | 16384 |
| POP3S | 32768 |
| SMTP | 65536 |
| SMTPS | 131072 |
| RTSP | 262144 |
| ALL | -1 |

### Examples

Allow only HTTP and HTTPS:

 MBS ( "CURL.SetOptionProtocols"; $curl ; 1 + 2 )  
### See also

- [CURL.SetOptionPathAsIs](CURLSetOptionPathAsIs.md)
- [CURL.SetOptionPostFields](CURLSetOptionPostFields.md)
- [CURL.SetOptionPostQuote](CURLSetOptionPostQuote.md)
- [CURL.SetOptionPreQuote](CURLSetOptionPreQuote.md)
- [CURL.SetOptionProtocolsString](CURLSetOptionProtocolsString.md)
- [CURL.SetOptionProxyAuth](CURLSetOptionProxyAuth.md)
- [CURL.SetOptionProxyPort](CURLSetOptionProxyPort.md)
- [CURL.SetOptionProxyType](CURLSetOptionProxyType.md)
- [CURL.SetOptionRedirProtocols](CURLSetOptionRedirProtocols.md)
- [CURL.SetOptionRedirProtocolsString](CURLSetOptionRedirProtocolsString.md)

### Release notes

- **Version 13.0**
    - Deprecated [CURL.SetOptionProtocols](https://www.mbsplugins.eu/CURLSetOptionProtocols.shtml) in favor of [CURL.SetOptionProtocolsString](https://www.mbsplugins.eu/CURLSetOptionProtocolsString.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 13.0pr5](https://www.mbsplugins.de/archive/2023-01-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 24th June 2025

  
[CURL.SetOptionPreQuote](CURLSetOptionPreQuote.md) - [CURL.SetOptionProtocolsString](CURLSetOptionProtocolsString.md)

[HTML Version](CURLSetOptionProtocols.shtml)