List of 28 Protocols supported by cURL with Examples

cURL Protocols with Examples

cURL supports an extensive list of Protocols,

Let's take a look at some of the examples with each one of them,

  1. DICT
  2. Using DICT protocol you fetch definitions and details of words using online dictionaries.

    $ curl dict://
    220 dictd 1.12.1/rf on Linux 4.19.0-10-amd64 <auth.mime> <>
    250 ok
    150 1 definitions retrieved
    151 "soccer" wn "WordNet (r) 3.0 (2006)"
        n 1: a football game in which two teams of 11 players try to
             kick or head a ball into the opponents' goal [syn:
             {soccer}, {association football}]
    250 ok [d/m/c = 1/0/32; 0.000r 0.000u 0.000s]
    221 bye [d/m/c = 0/0/0; 0.000r 0.000u 0.000s]

  3. FILE
  4. Using the FILE protocol with cURL, you can get a file from your local system. Note this is not a network protocol.

    Example: FILE Protocol on macOS/Linux
    % curl file:///Users/code2care/Desktop/file.html
    Hello World!
    Example: FILE Protocol on Windows
    > curl file://c:/users/code2care/desktop/file.html
    Hello World!

  5. FTP
  6. The File Transfer Protocol, to download and upload files on an FTP Server,

    $ curl

  7. FTPS
  8. FTPS Protocol is an extension to the File Transfer Protocol (FTP), it adds support for the Transport Layer Security (TLS)

    $ curl ftps://

  10. GOPHER is a distributing, searching, and retrieving documents over the Internet Protocol.

    $ curl gopher://

  12. GOPHERS is a secured Gopher using TLS.

    $ curl gophers://

  13. HTTP
  14. HTTP is what we are all familiar with: Hypertext Transfer Protocol,

    $ curl

  15. HTTPS
  16. HTTPS is secured HTTP using SSL/TLS,

    $ curl

  17. IMAP
  18. IMAP: Internet Message Access Protocol is used for reading email.

    $ curl imap:// -u user:password

  19. IMAPS
  20. IMAPS is secured IMAP using SSL/TLS.

    $ curl imaps:// -u user:password

  21. LDAP
  22. LDAP is a Lightweight Directory Access Protocol used for accessing and maintaining distributed directory information.

    curl "ldap://,dc=org?dir?sub?cn=code2care" -u "cn=admin"
    Enter host password for user 'cn=admin':
    DN: uid=code2careorg,ou=People,dc=code2care,dc=org
    homephone: +1 XX XX XXXX

  23. LDAPS
  24. LDAPS is secured LDAP using SSL/TLS.

    curl "ldaps://,dc=org?dir?sub?cn=code2care" -u "cn=admin"
    Enter host password for user 'cn=admin':
    DN: uid=code2careorg,ou=People,dc=code2care,dc=org
    homephone: +1 XX XX XXXX

  25. MQTT
  26. MQTT: Message Queuing Telemetry Transport is a pub-sub-based protocol, widely used in IoT systems.

    $ curl mqtt://
    Publish Example:
    curl -d 22 mqtt://

  27. POP3
  28. POP3: Post Office Protocol version 3 is a protocol that is used for retrieving email from a mail server.

    $ curl pop3://

  29. POP3S
  30. POP3S is secured using SSL/TLS.

    $ curl pop3s://

  31. RTMP
  32. RTMP: Real-Time Messaging Protocol is a protocol used for streaming audio, video, and data.

    $ curl rtmp://

  33. RTMPS
  34. RTMPS is secured using SSL/TLS.

    $ curl rtmps://

  35. RTSP
  36. RTSP: Real Time Streaming Protocol is a network protocol for controlling streaming media servers.

    $ curl rtsp://

  37. SCP
  38. SCP: Secure Copy protocol is used to copy files to and from a remote SSH server.

    $ curl scp:// -u user

  39. SFTP
  40. SFTP: SSH File Transfer Protocol is used to access, transfer, manage remote files over a reliable data stream.

    $ curl s -u user

  41. SMB
  42. SMB: Server Message Block protocol an application-layer network protocol used for providing shared access to files, printers, and serial ports.

    $ curl -u "code2care\user:password" smb://2023/JAN/01

  43. SMBS
  44. Secured SMB using SSL/TLS.

    $ curl -u "code2care\user:password" smbs://2023/JAN/01

  45. SMTP
  46. SMTP: Simple Mail Transfer Protocol is used for email transmission.

    $ curl s -u user

  47. SMTPS
  48. It is a secured SMTP using SSL/TLS.

    $ curl sftps:// -u user

  49. TELNET
  50. TELNET is an Application Layer Protocol. It is used to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection.

    $ curl telnet://

  51. TFTP
  52. TFTP: Trivial File Transfer Protocol is used for file transfers over UDP to get a file from or put a file onto a remote host

    Download Example:
    $ curl -O tftp://code2care-server/conf.txt
    Upload Example:
    $ curl -T conf.txt tftp://cod2care-server/

  53. WS
  54. WS: WebSocket is a bidirectional TCP-like protocol over an HTTP request.

    $ curl ws://

  55. WSS
  56. WS: WebSocket is a bidirectional TCP-like protocol over an HTTP request.

    $ curl wss://

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap