Name
easy:SetOpt_Protocols_Str -- allowed protocols (V2.0)
Synopsis
easy:SetOpt_Protocols_Str(spec)
Function
Pass a string that holds a comma-separated list of case insensitive protocol names (URL schemes) to allow in the transfer. This option allows applications to use libcurl 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 accepts all protocols it was built with support for. See also #CURLOPT_REDIR_PROTOCOLS_STR.

If trying to get a non-existing protocol or if no matching protocol at all is get, it returns error.

These are the available protocols:

 
DICT
FILE
FTP
FTPS
GOPHER
GOPHERS
HTTP
HTTPS
IMAP
IMAPS
LDAP
LDAPS
MQTT
POP3
POP3S
RTMP
RTMPE
RTMPS
RTMPT
RTMPTE
RTMPTS
RTSP
SCP
SFTP
SMB
SMBS
SMTP
SMTPS
TELNET
TFTP
WS
WSS

You can get "ALL" as a short-cut to enable all protocols. Note that by setting all, you may enable protocols that were not supported the day you write this but are introduced in a future libcurl version.

hurl.VersionInfo() can be used to get a list of all supported protocols in the current libcurl. #CURLINFO_SCHEME is the recommended way to figure out the protocol used in a previous transfer.

Inputs
spec
input value

Show TOC