Skip to content

Command line equivalents table

Andrew Lambert edited this page Feb 6, 2022 · 20 revisions

Remarks

This table lists the various curl command line options and their equivalents in this libcurl binding. Not all command line options have libcurl equivalents, and not all features exposed by libcurl can be expressed in terms of a command line.

Many features are accessed by calling the EasyHandle.SetOption or cURLManager.SetOption methods. For these features the binding equivalent gives a sample call.

Command line option Binding equivalent
--abstract-unix-socket SetOption(libcURL.Opts.ABSTRACT_UNIX_SOCKET, "/tmp/foo.sock")
--alt-svc N/A
--anyauth, --basic, --digest, --negotiate, --ntlm, --ntlm-wb cURLManager.HTTPAuthenticationMethod
-a, --append SetOption(libcURL.Opts.APPEND, True)
--aws-sigv4 SetOption(libcURL.Opts.AWS_SIGV4, "provider1:provider2")
--cacert, --capath EasyHandle.CA_ListFile
--cert-status SetOption(libcURL.Opts.SSL_VERIFYSTATUS, True)
--cert-type SetOption(libcURL.Opts.SSLCERTTYPE, "PEM")
-E, --cert SetOption(libcURL.Opts.SSLCERT, ClientCertFile)
--ciphers SetOption(libcURL.Opts.SSL_CIPHER_LIST, "TLSv1")
--compressed-ssh SetOption(libcURL.Opts.SSH_COMPRESSION, True)
--compressed EasyHandle.HTTPCompression
-K, --config N/A
--connect-timeout EasyHandle.ConnectionTimeout
--connect-to SetOption(libcURL.Opts.CONNECT_TO, listOfConnectors)
-C, --continue-at SetOption(libcURL.Opts.RESUME_FROM, 200)
-c, --cookie-jar, -b, --cookie, -j, --junk-session-cookies CookieEngine
--create-dirs N/A
--create-file-mode SetOption(libcURL.Opts.NEW_FILE_PERMS, &o744)
--crlf N/A
--crlfile SetOption(libcURL.Opts.CRLFILE, theFile)
--curves SetOption(libcURL.Opts.SSL_EC_CURVES, "X25519:P-521")
--data-ascii, --data-binary, --data-raw, --data-urlencode, -d, --data Not applicable; upload data is provided by you directly.
--delegation TBD
--disable-eprt SetOption(libcURL.Opts.FTP_USE_EPRT, False)
--disable-epsv SetOption(libcURL.Opts.FTP_USE_EPSV, False)
-q, --disable N/A
--disallow-username-in-url N/A
--dns-interface SetOption(libcURL.Opts.DNS_INTERFACE, "eth0")
--dns-ipv4-addr SetOption(libcURL.Opts.DNS_LOCAL_IP4, "192.168.0.14")
--dns-ipv6-addr SetOption(libcURL.Opts.DNS_LOCAL_IP6, "fe80::a9ff:fe46:b619")
--dns-servers SetOption(libcURL.Opts.DNS_SERVERS, "192.168.1.100:53,192.168.1.101")
--doh-cert-status TBD
--doh-insecure TBD
--doh-url TBD
-D, --dump-header N/A
--egd-file SetOption(libcURL.Opts.EGDSOCKET, "/var/egd.socket")
--engine libcURL.SetSSLBackend
--etag-compare N/A
--etag-save N/A
--expect100-timeout SetOption(libcURL.Opts.EXPECT_100_TIMEOUT_MS, 3000)
-f, --fail, --fail-early, --fail-with-body EasyHandle.FailOnServerError
--false-start SetOption(libcURL.Opts.SSL_FALSESTART, True)
--form-string, -F, --form cURLClient.Post; EasyHandle.SetFormData
--ftp-account SetOption(libcURL.Opts.FTP_ACCOUNT, "human-resources")
--ftp-alternative-to-user SetOption(libcURL.Opts.FTP_ALTERNATIVE_TO_USER, "two users")
--ftp-create-dirs SetOption(libcURL.Opts.FTP_CREATE_MISSING_DIRS, True)
--ftp-method EasyHandle.CWDMethod
--ftp-pasv N/A
-P, --ftp-port SetOption(libcURL.Opts.FTPPORT, "-")
--ftp-pret SetOption(libcURL.Opts.FTP_USE_PRET, True)
--ftp-skip-pasv-ip SetOption(libcURL.Opts.FTP_SKIP_PASV_IP, True)
--ftp-ssl-ccc-mode, --ftp-ssl-ccc SetOption(libcURL.Opts.FTP_SSL_CCC, 2)
-G, --get, -X, --request cURLManager.SetRequestMethod
-g, --globoff N/A
--happy-eyeballs-timeout-ms SetOption(libcURL.Opts.HAPPY_EYEBALLS_TIMEOUT_MS, 300)
--haproxy-protocol SetOption(libcURL.Opts.HAPROXYPROTOCOL, True)
-I, --head cURLClient.Head
-H, --header RequestHeaderEngine
-h, --help N/A
--hostpubmd5 SetOption(libcURL.Opts.SSH_HOST_PUBLIC_KEY_MD5, theHash)
--hsts N/A
--http0.9, -0, --http1.0, --http1.1, --http2-prior-knowledge, --http2, --http3 EasyHandle.HTTPVersion
--ignore-content-length N/A
-i, --include SetOption(libcURL.Opts.HEADER, True)
-k, --insecure EasyHandle.Secure
--interface EasyHandle.NetworkInterface
-4, --ipv4, -6, --ipv6 EasyHandle.IPVersion
--keepalive-time SetOption(libcURL.Opts.TCP_KEEPALIVE, True) and SetOption(libcURL.Opts.TCP_KEEPINTVL, 60)
--key-type SetOption(libcURL.Opts.SSLKEYTYPE, "PEM")
--key TBD
--krb SetOption(libcURL.Opts.KRBLEVEL, "private")
--libcurl N/A
--limit-rate N/A
-l, --list-only SetOption(libcURL.Opts.DIRLISTONLY, True)
--local-port EasyHandle.LocalPort
--location-trusted N/A
-L, --location EasyHandle.FollowRedirects
--login-options SetOption(libcURL.Opts.LOGIN_OPTIONS, "AUTH=*")
--mail-auth SetOption(libcURL.Opts.MAIL_AUTH, "<secret@cave>")
--mail-from SetOption(libcURL.Opts.MAIL_FROM, "president@example.com")
--mail-rcpt-allowfails SetOption(libcURL.Opts.MAIL_RCPT_ALLLOWFAILS, True)
--mail-rcpt SetOption(libcURL.Opts.MAIL_RCPT, listOfRecipients)
-M, --manual N/A
--max-filesize N/A
--max-redirs EasyHandle.MaxRedirects
-m, --max-time N/A
--metalink N/A
--netrc-file, --netrc-optional SetOption(libcURL.Opts.NETRC_FILE, "/tmp/magic-netrc")
-n, --netrc SetOption(libcURL.Opts.NETRC, 1)
-:, --next See: multiple simultaneous transfers example.
--no-alpn SetOption(libcURL.Opts.SSL_ENABLE_ALPN, False)
-N, --no-buffer N/A
--no-keepalive SetOption(libcURL.Opts.TCP_KEEPALIVE, False)
--no-npn SetOption(libcURL.Opts.SSL_ENABLE_NPN, False)
--no-progress-meter EasyHandle.UseProgressEvent
--no-sessionid SetOption(libcURL.Opts.SSL_SESSIONID_CACHE, False)
--noproxy ProxyEngine.ExcludeHost
--oauth2-bearer SetOption(libcURL.Opts.XOAUTH2_BEARER, "1ab9cb22ba269a7")
--output-dir N/A
-o, --output N/A
--parallel-immediate, --parallel-max, -Z, --parallel N/A
--pass SetOption(libcURL.Opts.KEYPASSWD, "seekrit")
--path-as-is SetOption(libcURL.Opts.PATH_AS_IS, True)
--pinnedpubkey SetOption(libcURL.Opts.PINNEDPUBLICKEY, "sha256//YhKJKSzoTt2b5FP18fvpHo7fJYqQCjAa3HWY3tvRMwE=;sha256//t62CeU2tQiqkexU74Gxa2eg7fRbEgoChTociMee9wno=")
--post301, --post302, --post303 EasyHandle.HTTPPreserveMethod
--preproxy SetOption(libcURL.Opts.PRE_PROXY, "socks4://socks-proxy:1080")
-#, --progress-bar N/A
--proto-default SetOption(libcURL.Opts.DEFAULT_PROTOCOL, "https")
--proto-redir SetOption(libcURL.Opts.REDIR_PROTOCOLS, libcURL.Protocols.HTTPS)
--proto SetOption(libcURL.Opts.PROTOCOLS, libcURL.Protocols.HTTPS)
--proxy-anyauth, --proxy-basic, --proxy-digest, --proxy-negotiate, --proxy-ntlm ProxyEngine.SetAuthMethods
--proxy-cacert, --proxy-capath ProxyEngine.CA_ListFile
--proxy-cert-type SetOption(libcURL.Opts.PROXY_SSLCERTTYPE, "PEM")
--proxy-cert SetOption(libcURL.Opts.PROXY_SSLCERT, "client.pem")
--proxy-ciphers SetOption(libcURL.Opts.PROXY_SSL_CIPHER_LIST, "TLSv1")
--proxy-crlfile SetOption(libcURL.Opts.CRLFILE, "/etc/certs/crl.pem")
--proxy-header ProxyEngine.SetHeader
--proxy-insecure ProxyEngine.Secure
--proxy-key-type TBD
--proxy-key TBD
--proxy-pass TBD
--proxy-pinnedpubkey TBD
--proxy-service-name ProxyEngine.ServiceName
--proxy-ssl-allow-beast TBD
--proxy-ssl-auto-client-cert TBD
--proxy-tls13-ciphers TBD
--proxy-tlsauthtype TBD
--proxy-tlspassword TBD
--proxy-tlsuser TBD
--proxy-tlsv1 TBD
-U, --proxy-user ProxyEngine.Username
-x, --proxy,--proxy1.0 ProxyEngine.Address
-p, --proxytunnel ProxyEngine.HTTPTunnel
--pubkey TBD
-Q, --quote SetOption(libcURL.Opts.QUOTE, ListOfCmds)
--random-file SetOption(libcURL.Opts.RANDOM_FILE, "junk.txt")
-r, --range SetOption(libcURL.Opts.RANGE, "0-199")
--raw N/A
-e, --referer EasyHandle.AutoReferer
-J, --remote-header-name, --remote-name-all, --remote-name, -R, --remote-time N/A
--request-target SetOption(libcURL.Opts.REQUEST_TARGET, "*")
--resolve SetOption(libcURL.Opts.RESOLVE, listOfHosts)
--retry-all-errors, --retry-connrefused, --retry-delay, --retry-max-time, --retry N/A
--sasl-authzid SetOption(libcURL.Opts.SASL_AUTHZID, "Ursel")
--sasl-ir SetOption(libcURL.Opts.SASL_IR, True)
--service-name TBD
-S, --show-error, -s, --silent N/A
--socks4, --socks4a, --socks5, --socks5-hostname ProxyEngine.Type
--socks5-basic, --socks5-gssapi-nec, --socks5-gssapi ProxyEngine.SetAuthMethods
--socks5-gssapi-service SetOption(libcURL.Opts.SOCKS5_GSSAPI_SERVICE, "rcmd-special")
-Y, --speed-limit SetOption(libcURL.Opts.LOW_SPEED_LIMIT, 30)
-y, --speed-time SetOption(libcURL.Opts.LOW_SPEED_TIME, 60)
--ssl-allow-beast SetOption(libcURL.Opts.SSL_OPTIONS, libcURL.EasyHandle.CURLSSLOPT_ALLOW_BEAST)
--ssl-auto-client-cert SetOption(libcURL.Opts.SSL_OPTIONS, libcURL.EasyHandle.CURLSSLOPT_AUTO_CLIENT_CERT)
--ssl-no-revoke SetOption(libcURL.Opts.SSL_OPTIONS, libcURL.EasyHandle.CURLSSLOPT_NO_REVOKE)
--ssl-reqd, --ssl, --ftp-ssl-control EasyHandle.ConnectionType
--ssl-revoke-best-effort SetOption(libcURL.Opts.SSL_OPTIONS, libcURL.EasyHandle.CURLSSLOPT_REVOKE_BEST_EFFORT)
--stderr N/A
--styled-output N/A
--suppress-connect-headers N/A
--tcp-fastopen SetOption(libcURL.Opts.TCP_FASTOPEN, True)
--tcp-nodelay SetOption(libcURL.Opts.TCP_NODELAY, True)
-t, --telnet-option SetOption(libcURL.Opts.TELNETOPTIONS, listOfOptions)
--tftp-blksize SetOption(libcURL.Opts.TFTP_BLKSIZE, 2048)
--tftp-no-options SetOption(libcURL.Opts.TFTP_NO_OPTIONS, True)
-z, --time-cond N/A
--tls13-ciphers SetOption(libcURL.Opts.TLS13_CIPHERS, "TLS13-CHACHA20-POLY1305-SHA256")
--tlsauthtype SetOption(libcURL.Opts.TLSAUTH_TYPE, "SRP")
--tlspassword SetOption(libcURL.Opts.TLSAUTH_PASSWORD, "seekrit")
--tlsuser SetOption(libcURL.Opts.TLSAUTH_USERNAME, "bob")
--tlsv1.0, --tlsv1.1, --tlsv1.2, --tlsv1.3, -1, --tlsv1, --tls-max, -2, --sslv2, -3, --sslv3 EasyHandle.SSLVersion
--tr-encoding SetOption(libcURL.Opts.TRANSFER_ENCODING, True)
--trace-ascii, --trace-time, --trace N/A
--unix-socket SetOption(libcURL.Opts.UNIX_SOCKET_PATH, "/tmp/nginx.sock")
-T, --upload-file cURLClient.Put
--url EasyHandle.URL, et al.
-B, --use-ascii TBD
-A, --user-agent EasyHandle.UserAgent
-u, --user EasyHandle.Username; cURLManager.Username; EasyHandle.Password; cURLManager.Password
-v, --verbose EasyHandle.Verbose
-V, --version libcURL.Version
-w, --write-out N/A
--xattr N/A
Clone this wiki locally