]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl.1: provide examples for each option
authorDaniel Stenberg <daniel@haxx.se>
Tue, 31 Aug 2021 14:37:14 +0000 (16:37 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 1 Sep 2021 12:02:43 +0000 (14:02 +0200)
The file format for each option now features a "Example:" header that
can provide one or more examples that get rendered appropriately in the
output. All options MUST have at least one example or gen.pl complains
at build-time.

This fix also does a few other minor format and consistency cleanups.

Closes #7654

245 files changed:
docs/cmdline-opts/MANPAGE.md
docs/cmdline-opts/abstract-unix-socket.d
docs/cmdline-opts/alt-svc.d
docs/cmdline-opts/anyauth.d
docs/cmdline-opts/append.d
docs/cmdline-opts/aws-sigv4.d
docs/cmdline-opts/basic.d
docs/cmdline-opts/cacert.d
docs/cmdline-opts/capath.d
docs/cmdline-opts/cert-status.d
docs/cmdline-opts/cert-type.d
docs/cmdline-opts/cert.d
docs/cmdline-opts/ciphers.d
docs/cmdline-opts/compressed-ssh.d
docs/cmdline-opts/compressed.d
docs/cmdline-opts/config.d
docs/cmdline-opts/connect-timeout.d
docs/cmdline-opts/connect-to.d
docs/cmdline-opts/continue-at.d
docs/cmdline-opts/cookie-jar.d
docs/cmdline-opts/cookie.d
docs/cmdline-opts/create-dirs.d
docs/cmdline-opts/create-file-mode.d
docs/cmdline-opts/crlf.d
docs/cmdline-opts/crlfile.d
docs/cmdline-opts/curves.d
docs/cmdline-opts/data-ascii.d
docs/cmdline-opts/data-binary.d
docs/cmdline-opts/data-raw.d
docs/cmdline-opts/data-urlencode.d
docs/cmdline-opts/data.d
docs/cmdline-opts/delegation.d
docs/cmdline-opts/digest.d
docs/cmdline-opts/disable-eprt.d
docs/cmdline-opts/disable-epsv.d
docs/cmdline-opts/disable.d
docs/cmdline-opts/disallow-username-in-url.d
docs/cmdline-opts/dns-interface.d
docs/cmdline-opts/dns-ipv4-addr.d
docs/cmdline-opts/dns-ipv6-addr.d
docs/cmdline-opts/dns-servers.d
docs/cmdline-opts/doh-cert-status.d
docs/cmdline-opts/doh-insecure.d
docs/cmdline-opts/doh-url.d
docs/cmdline-opts/dump-header.d
docs/cmdline-opts/egd-file.d
docs/cmdline-opts/engine.d
docs/cmdline-opts/etag-compare.d
docs/cmdline-opts/etag-save.d
docs/cmdline-opts/expect100-timeout.d
docs/cmdline-opts/fail-early.d
docs/cmdline-opts/fail-with-body.d
docs/cmdline-opts/fail.d
docs/cmdline-opts/false-start.d
docs/cmdline-opts/form-string.d
docs/cmdline-opts/form.d
docs/cmdline-opts/ftp-account.d
docs/cmdline-opts/ftp-alternative-to-user.d
docs/cmdline-opts/ftp-create-dirs.d
docs/cmdline-opts/ftp-method.d
docs/cmdline-opts/ftp-pasv.d
docs/cmdline-opts/ftp-port.d
docs/cmdline-opts/ftp-pret.d
docs/cmdline-opts/ftp-skip-pasv-ip.d
docs/cmdline-opts/ftp-ssl-ccc-mode.d
docs/cmdline-opts/ftp-ssl-ccc.d
docs/cmdline-opts/ftp-ssl-control.d
docs/cmdline-opts/gen.pl
docs/cmdline-opts/get.d
docs/cmdline-opts/globoff.d
docs/cmdline-opts/happy-eyeballs-timeout-ms.d
docs/cmdline-opts/haproxy-protocol.d
docs/cmdline-opts/head.d
docs/cmdline-opts/header.d
docs/cmdline-opts/help.d
docs/cmdline-opts/hostpubmd5.d
docs/cmdline-opts/hsts.d
docs/cmdline-opts/http0.9.d
docs/cmdline-opts/http1.0.d
docs/cmdline-opts/http1.1.d
docs/cmdline-opts/http2-prior-knowledge.d
docs/cmdline-opts/http2.d
docs/cmdline-opts/http3.d
docs/cmdline-opts/ignore-content-length.d
docs/cmdline-opts/include.d
docs/cmdline-opts/insecure.d
docs/cmdline-opts/interface.d
docs/cmdline-opts/ipv4.d
docs/cmdline-opts/ipv6.d
docs/cmdline-opts/junk-session-cookies.d
docs/cmdline-opts/keepalive-time.d
docs/cmdline-opts/key-type.d
docs/cmdline-opts/key.d
docs/cmdline-opts/krb.d
docs/cmdline-opts/libcurl.d
docs/cmdline-opts/limit-rate.d
docs/cmdline-opts/list-only.d
docs/cmdline-opts/local-port.d
docs/cmdline-opts/location-trusted.d
docs/cmdline-opts/location.d
docs/cmdline-opts/login-options.d
docs/cmdline-opts/mail-auth.d
docs/cmdline-opts/mail-from.d
docs/cmdline-opts/mail-rcpt-allowfails.d
docs/cmdline-opts/mail-rcpt.d
docs/cmdline-opts/manual.d
docs/cmdline-opts/max-filesize.d
docs/cmdline-opts/max-redirs.d
docs/cmdline-opts/max-time.d
docs/cmdline-opts/metalink.d
docs/cmdline-opts/negotiate.d
docs/cmdline-opts/netrc-file.d
docs/cmdline-opts/netrc-optional.d
docs/cmdline-opts/netrc.d
docs/cmdline-opts/next.d
docs/cmdline-opts/no-alpn.d
docs/cmdline-opts/no-buffer.d
docs/cmdline-opts/no-keepalive.d
docs/cmdline-opts/no-npn.d
docs/cmdline-opts/no-progress-meter.d
docs/cmdline-opts/no-sessionid.d
docs/cmdline-opts/noproxy.d
docs/cmdline-opts/ntlm-wb.d
docs/cmdline-opts/ntlm.d
docs/cmdline-opts/oauth2-bearer.d
docs/cmdline-opts/output-dir.d
docs/cmdline-opts/output.d
docs/cmdline-opts/parallel-immediate.d
docs/cmdline-opts/parallel-max.d
docs/cmdline-opts/parallel.d
docs/cmdline-opts/pass.d
docs/cmdline-opts/path-as-is.d
docs/cmdline-opts/pinnedpubkey.d
docs/cmdline-opts/post301.d
docs/cmdline-opts/post302.d
docs/cmdline-opts/post303.d
docs/cmdline-opts/preproxy.d
docs/cmdline-opts/progress-bar.d
docs/cmdline-opts/proto-default.d
docs/cmdline-opts/proto-redir.d
docs/cmdline-opts/proto.d
docs/cmdline-opts/proxy-anyauth.d
docs/cmdline-opts/proxy-basic.d
docs/cmdline-opts/proxy-cacert.d
docs/cmdline-opts/proxy-capath.d
docs/cmdline-opts/proxy-cert-type.d
docs/cmdline-opts/proxy-cert.d
docs/cmdline-opts/proxy-ciphers.d
docs/cmdline-opts/proxy-crlfile.d
docs/cmdline-opts/proxy-digest.d
docs/cmdline-opts/proxy-header.d
docs/cmdline-opts/proxy-insecure.d
docs/cmdline-opts/proxy-key-type.d
docs/cmdline-opts/proxy-key.d
docs/cmdline-opts/proxy-negotiate.d
docs/cmdline-opts/proxy-ntlm.d
docs/cmdline-opts/proxy-pass.d
docs/cmdline-opts/proxy-pinnedpubkey.d
docs/cmdline-opts/proxy-service-name.d
docs/cmdline-opts/proxy-ssl-allow-beast.d
docs/cmdline-opts/proxy-ssl-auto-client-cert.d
docs/cmdline-opts/proxy-tls13-ciphers.d
docs/cmdline-opts/proxy-tlsauthtype.d
docs/cmdline-opts/proxy-tlspassword.d
docs/cmdline-opts/proxy-tlsuser.d
docs/cmdline-opts/proxy-tlsv1.d
docs/cmdline-opts/proxy-user.d
docs/cmdline-opts/proxy.d
docs/cmdline-opts/proxy1.0.d
docs/cmdline-opts/proxytunnel.d
docs/cmdline-opts/pubkey.d
docs/cmdline-opts/quote.d
docs/cmdline-opts/random-file.d
docs/cmdline-opts/range.d
docs/cmdline-opts/raw.d
docs/cmdline-opts/referer.d
docs/cmdline-opts/remote-header-name.d
docs/cmdline-opts/remote-name-all.d
docs/cmdline-opts/remote-name.d
docs/cmdline-opts/remote-time.d
docs/cmdline-opts/request-target.d
docs/cmdline-opts/request.d
docs/cmdline-opts/resolve.d
docs/cmdline-opts/retry-all-errors.d
docs/cmdline-opts/retry-connrefused.d
docs/cmdline-opts/retry-delay.d
docs/cmdline-opts/retry-max-time.d
docs/cmdline-opts/retry.d
docs/cmdline-opts/sasl-authzid.d
docs/cmdline-opts/sasl-ir.d
docs/cmdline-opts/service-name.d
docs/cmdline-opts/show-error.d
docs/cmdline-opts/silent.d
docs/cmdline-opts/socks4.d
docs/cmdline-opts/socks4a.d
docs/cmdline-opts/socks5-basic.d
docs/cmdline-opts/socks5-gssapi-nec.d
docs/cmdline-opts/socks5-gssapi-service.d
docs/cmdline-opts/socks5-gssapi.d
docs/cmdline-opts/socks5-hostname.d
docs/cmdline-opts/socks5.d
docs/cmdline-opts/speed-limit.d
docs/cmdline-opts/speed-time.d
docs/cmdline-opts/ssl-allow-beast.d
docs/cmdline-opts/ssl-auto-client-cert.d
docs/cmdline-opts/ssl-no-revoke.d
docs/cmdline-opts/ssl-reqd.d
docs/cmdline-opts/ssl-revoke-best-effort.d
docs/cmdline-opts/ssl.d
docs/cmdline-opts/sslv2.d
docs/cmdline-opts/sslv3.d
docs/cmdline-opts/stderr.d
docs/cmdline-opts/styled-output.d
docs/cmdline-opts/suppress-connect-headers.d
docs/cmdline-opts/tcp-fastopen.d
docs/cmdline-opts/tcp-nodelay.d
docs/cmdline-opts/telnet-option.d
docs/cmdline-opts/tftp-blksize.d
docs/cmdline-opts/tftp-no-options.d
docs/cmdline-opts/time-cond.d
docs/cmdline-opts/tls-max.d
docs/cmdline-opts/tls13-ciphers.d
docs/cmdline-opts/tlsauthtype.d
docs/cmdline-opts/tlspassword.d
docs/cmdline-opts/tlsuser.d
docs/cmdline-opts/tlsv1.0.d
docs/cmdline-opts/tlsv1.1.d
docs/cmdline-opts/tlsv1.2.d
docs/cmdline-opts/tlsv1.3.d
docs/cmdline-opts/tlsv1.d
docs/cmdline-opts/tr-encoding.d
docs/cmdline-opts/trace-ascii.d
docs/cmdline-opts/trace-time.d
docs/cmdline-opts/trace.d
docs/cmdline-opts/unix-socket.d
docs/cmdline-opts/upload-file.d
docs/cmdline-opts/url.d
docs/cmdline-opts/use-ascii.d
docs/cmdline-opts/user-agent.d
docs/cmdline-opts/user.d
docs/cmdline-opts/verbose.d
docs/cmdline-opts/version.d
docs/cmdline-opts/write-out.d
docs/cmdline-opts/xattr.d
src/tool_help.c

index b903bc25e09da55936bb947c02e9187b06b7387e..f7f09eb1d3b8b446881bc0f4779809ec763bfd37 100644 (file)
@@ -28,6 +28,7 @@ Each file has a set of meta-data and a body of text.
     Requires: (space separated list of features this requires, no dashes)
     See-also: (space separated list of related options, no dashes)
     Help: (short text for the --help output for this option)
+    Example: (example command line, without "curl" and can use `$URL`)
     --- (end of meta-data)
 
 ### Body
index 8403cab9d156396f16fada580ea3ed9bdf5a8edc..e26048f1de06291277a727c6357b75350daeef4e 100644 (file)
@@ -4,6 +4,7 @@ Help: Connect via abstract Unix domain socket
 Added: 7.53.0
 Protocols: HTTP
 Category: connection
+Example: --abstract-unix-socket socketpath $URL
 ---
 Connect through an abstract Unix domain socket, instead of using the network.
 Note: netstat shows the path of an abstract socket prefixed with '@', however
index 5598b59b48076c80ddd1ec1a881a4e3e1a446c9c..914b1fbc6b79db5f7bb24338d24da9dd048e6d1c 100644 (file)
@@ -4,9 +4,8 @@ Protocols: HTTPS
 Help: Enable alt-svc with this cache file
 Added: 7.64.1
 Category: http
+Example: --alt-svc svc.txt $URL
 ---
-WARNING: this option is experimental. Do not use in production.
-
 This option enables the alt-svc parser in curl. If the file name points to an
 existing alt-svc cache file, that will be used. After a completed transfer,
 the cache will be saved to the file name again if it has been modified.
index bec0c0c861255c19082a21cd4c9e856e297b8743..427a64c89f0f89ccca850f09a921faeae137c56b 100644 (file)
@@ -3,6 +3,7 @@ Help: Pick any authentication method
 Protocols: HTTP
 See-also: proxy-anyauth basic digest
 Category: http proxy auth
+Example: --anyauth --user me:pwd $URL
 ---
 Tells curl to figure out authentication method by itself, and use the most
 secure one the remote site claims to support. This is done by first doing a
index 8bdb2594d45efc52fd84bc369339e3260e7263c9..8afaf0eb6190138f98707b2dbfe9e77c3fee1765 100644 (file)
@@ -3,6 +3,7 @@ Long: append
 Help: Append to target file when uploading
 Protocols: FTP SFTP
 Category: ftp sftp
+Example: --upload-file local --append ftp://example.com/
 ---
 When used in an upload, this makes curl append to the target file instead of
 overwriting it. If the remote file doesn't exist, it will be created.  Note
index 26546df3f66196f3664800f8689dfcfce9bb318d..db988640b457e3ac55916b9ed401fa839dc7500b 100644 (file)
@@ -3,6 +3,7 @@ Arg: <provider1[:provider2[:region[:service]]]>
 Help: Use AWS V4 signature authentication
 Category: auth http
 Added: 7.75.0
+Example: --aws-sigv4 "aws:amz:east-2:es" --user "key:secret" $URL
 ---
 Use AWS V4 signature authentication in the transfer.
 
index e222c51c1ce6cef2e87f6e1e2d8427da6f4fc388..62d2c22b0adcf559dd43e7eced29981c70264d20 100644 (file)
@@ -3,6 +3,7 @@ Help: Use HTTP Basic Authentication
 See-also: proxy-basic
 Protocols: HTTP
 Category: auth
+Example: -u name:password --basic $URL
 ---
 Tells curl to use HTTP Basic authentication with the remote host. This is the
 default and this option is usually pointless, unless you use it to override a
index 793d8c1ba176e06c12cff481ac8238bbc05a7e79..1f38040461f9bdf17ea0fa26ef60e66c869150dd 100644 (file)
@@ -3,6 +3,7 @@ Arg: <file>
 Help: CA certificate to verify peer against
 Protocols: TLS
 Category: tls
+Example: --cacert CA-file.txt $URL
 ---
 Tells curl to use the specified certificate file to verify the peer. The file
 may contain multiple CA certificates. The certificate(s) must be in PEM
@@ -26,9 +27,9 @@ should not be set. If the option is not set, then curl will use the
 certificates in the system and user Keychain to verify the peer, which is the
 preferred method of verifying the peer's certificate chain.
 
-(Schannel only) This option is supported for Schannel in Windows 7 or later with
-libcurl 7.60 or later. This option is supported for backward compatibility
-with other SSL engines; instead it is recommended to use Windows' store of
-root certificates (the default for Schannel).
+(Schannel only) This option is supported for Schannel in Windows 7 or later
+with libcurl 7.60 or later. This option is supported for backward
+compatibility with other SSL engines; instead it is recommended to use
+Windows' store of root certificates (the default for Schannel).
 
 If this option is used several times, the last one will be used.
index 4ce077a1471e5048c002fb756ca64d3ce9945c03..ba407ed0ce1aceaf6cfda5439520d7824e9b1f64 100644 (file)
@@ -3,6 +3,7 @@ Arg: <dir>
 Help: CA directory to verify peer against
 Protocols: TLS
 Category: tls
+Example: --capath /local/directory $URL
 ---
 Tells curl to use the specified certificate directory to verify the
 peer. Multiple paths can be provided by separating them with ":" (e.g.
index 63e35205101f8c70520af0c8a5bbff454fdff3e9..360e5c9019e3fd7498c6e6e49f9469c0339c96d4 100644 (file)
@@ -3,6 +3,7 @@ Protocols: TLS
 Added: 7.41.0
 Help: Verify the status of the server cert via OCSP-staple
 Category: tls
+Example: --cert-status $URL
 ---
 Tells curl to verify the status of the server certificate by using the
 Certificate Status Request (aka. OCSP stapling) TLS extension.
index b041bcb065134dc869cdb93224423ec6f91a201c..9fcbfe752ae8138e6d65909cc3f9f3a11cf06f78 100644 (file)
@@ -4,6 +4,7 @@ Arg: <type>
 Help: Certificate type (DER/PEM/ENG)
 See-also: cert key key-type
 Category: tls
+Example: --cert-type PEM --cert file $URL
 ---
 Tells curl what type the provided client certificate is using. PEM, DER, ENG
 and P12 are recognized types.  If not specified, PEM is assumed.
index 2938e571fb467f06f187a78a0b3753c392fc3149..8e0fb88e8e1014d72a016f54475c9f3bceda1215 100644 (file)
@@ -5,6 +5,7 @@ Help: Client certificate file and password
 Protocols: TLS
 See-also: cert-type key key-type
 Category: tls
+Example: --cert certfile --key keyfile $URL
 ---
 Tells curl to use the specified client certificate file when getting a file
 with HTTPS, FTPS or another SSL-based protocol. The certificate must be in
index 723b95923728e572f04bbc69c739ccfae064c8b0..c2cb92e0653ef846e3c4bfa0650f5d8f9fac1a40 100644 (file)
@@ -3,6 +3,7 @@ Arg: <list of ciphers>
 Help: SSL ciphers to use
 Protocols: TLS
 Category: tls
+Example: --ciphers ECDHE-ECDSA-AES256-CCM8 $URL
 ---
 Specifies which ciphers to use in the connection. The list of ciphers must
 specify valid ciphers. Read up on SSL cipher list details on this URL:
index 849fe18b0007a950ad0c21857dc5ab77055805ca..d95c6adfb0fece6864b4c20d9d45c3732fb2dc5d 100644 (file)
@@ -3,6 +3,7 @@ Help: Enable SSH compression
 Protocols: SCP SFTP
 Added: 7.56.0
 Category: scp ssh
+Example: --compressed-ssh sftp://example.com/
 ---
 Enables built-in SSH compression.
 This is a request, not an order; the server may or may not do it.
index dedd0e9e2de669381eb4fa9d6828d772e7247175..945beb85d9f763ac325390e1a45732f2978fbb4b 100644 (file)
@@ -2,6 +2,7 @@ Long: compressed
 Help: Request compressed response
 Protocols: HTTP
 Category: http
+Example: --compressed $URL
 ---
 Request a compressed response using one of the algorithms curl supports, and
 automatically decompress the content. Headers are not modified.
index 5a0ad1f4748e24f49c2db102649691fcc9b1d503..1805926950dd7a70a151c1a13617e5f076844101 100644 (file)
@@ -3,6 +3,7 @@ Arg: <file>
 Help: Read config from a file
 Short: K
 Category: curl
+Example: --config file.txt $URL
 ---
 
 Specify a text file to read curl arguments from. The command line arguments
index fa3277221a5d2723d6f1a35b383e62ebcc67054e..e66e35adfbea6c6063ef51b1f91ad2959181d273 100644 (file)
@@ -1,8 +1,10 @@
 Long: connect-timeout
-Arg: <seconds>
+Arg: <fractional seconds>
 Help: Maximum time allowed for connection
 See-also: max-time
 Category: connection
+Example: --connect-timeout 20 $URL
+Example: --connect-timeout 3.14 $URL
 ---
 Maximum time in seconds that you allow curl's connection to take.  This only
 limits the connection phase, so if curl connects within the given period it
index 2f015f8ac45ed80010a335d541e37138562f4a39..ebea9b9daed6d79b6cedab42dbb55c0154193758 100644 (file)
@@ -4,6 +4,7 @@ Help: Connect to host
 Added: 7.49.0
 See-also: resolve header
 Category: connection
+Example: --connect-to example.com:443:example.net:8443 $URL
 ---
 
 For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead.
index c44d2f496fc4f5b3a85c7d596d0bc91f216d9196..9e11bdb1234b5c2fa9912aa272cad9f8ae77b568 100644 (file)
@@ -4,6 +4,8 @@ Arg: <offset>
 Help: Resumed transfer offset
 See-also: range
 Category: connection
+Example: -C - $URL
+Example: -C 400 $URL
 ---
 Continue/Resume a previous file transfer at the given offset. The given offset
 is the exact number of bytes that will be skipped, counting from the beginning
index f11991f4e946c66cdbb38833db79d9f4440cbafd..f418af6d7673780b50a9108d2ad165abd64e9330 100644 (file)
@@ -4,6 +4,8 @@ Arg: <filename>
 Protocols: HTTP
 Help: Write cookies to <filename> after operation
 Category: http
+Example: -c store-here.txt $URL
+Example: -c store-here.txt -b read-these $URL
 ---
 Specify to which file you want curl to write all cookies after a completed
 operation. Curl writes all cookies from its in-memory cookie storage to the
index 5c40cf2d84378b21c972543c95c4653d8b13d194..b593935eb77185bb2007893ad021fc5a1e686dd7 100644 (file)
@@ -4,6 +4,8 @@ Arg: <data|filename>
 Protocols: HTTP
 Help: Send cookies from string/file
 Category: http
+Example: -b cookiefile $URL
+Example: -b cookiefile -c cookiefile $URL
 ---
 Pass the data to the HTTP server in the Cookie header. It is supposedly
 the data previously received from the server in a "Set-Cookie:" line.  The
index 801e95d1eae26dda42064a65261a825865288a5b..cae1d5a51c32c6dd52c2da93ff05b944c3a977cd 100644 (file)
@@ -1,6 +1,7 @@
 Long: create-dirs
 Help: Create necessary local directory hierarchy
 Category: curl
+Example: --create-dirs --output local/dir/file $URL
 ---
 When used in conjunction with the --output option, curl will create the
 necessary local directory hierarchy as needed. This option creates the
index 275fc6c21093c277388a4aef7c6e94f3537c1463..429b5ee33ce40b18affcc90e34558226dbc6436c 100644 (file)
@@ -5,6 +5,7 @@ Protocols: SFTP SCP FILE
 Category: sftp scp file upload
 See-also: ftp-create-dirs
 Added: 7.75.0
+Example: --create-file-mode 0777 -T localfile sftp://example.com/new
 ---
 When curl is used to create files remotely using one of the supported
 protocols, this option allows the user to set which 'mode' to set on the file
index 50c4bef81de3dc1bf2d0ce1b13aa6217c8a74843..856cd135a57c69b839b6b5bda40320989e5b6e7f 100644 (file)
@@ -2,6 +2,7 @@ Long: crlf
 Help: Convert LF to CRLF in upload
 Protocols: FTP SMTP
 Category: ftp smtp
+Example: --crlf -T file ftp://example.com/
 ---
 Convert LF to CRLF in upload. Useful for MVS (OS/390).
 
index 360e668d1e9da7a7a9d3c9d5e7a6ec4deae40e89..21e86a8c24f79d1c8d07957286e95f3e81bc7ae7 100644 (file)
@@ -1,9 +1,10 @@
 Long: crlfile
 Arg: <file>
 Protocols: TLS
-Help: Get a CRL list in PEM format from the given file
+Help: Use this CRL list
 Added: 7.19.7
 Category: tls
+Example: --crlfile rejects.txt $URL
 ---
 Provide a file using PEM format with a Certificate Revocation List that may
 specify peer certificates that are to be considered revoked.
index 47870a2789dc605184ad831399d9860b2d7f5cfe..ac5ab10169389cc6e456f8ea7dcd202df7b15d68 100644 (file)
@@ -4,6 +4,7 @@ Help: (EC) TLS key exchange algorithm(s) to request
 Protocols: TLS
 Added: 7.73.0
 Category: tls
+Example: --curves X25519 $URL
 ---
 Tells curl to request specific curves to use during SSL session establishment
 according to RFC 8422, 5.1.  Multiple algorithms can be provided by separating
index 3522f6345c811df0c8c4670942078b7d01b58431..943f301dd1517b96b854e0d74a5d740cd9a5bff4 100644 (file)
@@ -3,5 +3,6 @@ Arg: <data>
 Help: HTTP POST ASCII data
 Protocols: HTTP
 Category: http post upload
+Example: --data-ascii @file $URL
 ---
 This is just an alias for --data.
index c40785ece121cc02e23547fada585718a785e010..578cebca62caf2f4b5dc55402dc3528bd82f8be8 100644 (file)
@@ -3,6 +3,7 @@ Arg: <data>
 Help: HTTP POST binary data
 Protocols: HTTP
 Category: http post upload
+Example: --data-binary @filename $URL
 ---
 This posts data exactly as specified with no extra processing whatsoever.
 
index 4db83aefa0267166abb910c4dd7f398cfc453662..b8cd0f72117dec56dd80ebb17c1afb59f7bd3cb7 100644 (file)
@@ -5,6 +5,8 @@ Help: HTTP POST data, '@' allowed
 Added: 7.43.0
 See-also: data
 Category: http post upload
+Example: --data-raw "hello" $URL
+Example: --data-raw "@at@at@" $URL
 ---
 This posts data similarly to --data but without the special
 interpretation of the @ character.
index 2205f9db481ca907c6bba74fa30775954671b1d5..8b12957543d16c836786aa12f5c0c35cf2653e65 100644 (file)
@@ -5,6 +5,10 @@ Protocols: HTTP
 See-also: data data-raw
 Added: 7.18.0
 Category: http post upload
+Example: --data-urlencode name=val $URL
+Example: --data-urlencode =encodethis $URL
+Example: --data-urlencode name@file $URL
+Example: --data-urlencode @fileonly $URL
 ---
 This posts data, similar to the other --data options with the exception
 that this performs URL-encoding.
index 53ba86b36d5b38729f59872f2ea5bc17ed3ff837..35fd675edb43bb107a8a0c9b2be30ba1ca44a7ef 100644 (file)
@@ -6,6 +6,9 @@ Protocols: HTTP MQTT
 See-also: data-binary data-urlencode data-raw
 Mutexed: form head upload-file
 Category: important http post upload
+Example: -d "name=curl" $URL
+Example: -d "name=curl" -d "tool=cmdline" $URL
+Example: -d @filename $URL
 ---
 Sends the specified data in a POST request to the HTTP server, in the same way
 that a browser does when a user has filled in an HTML form and presses the
index 41fa9408c8ee14c8715a17f4638491bac47b2f0c..1514d66bc8bbaa9d7f13df29ac24aeaa3cd628a7 100644 (file)
@@ -3,6 +3,7 @@ Arg: <LEVEL>
 Help: GSS-API delegation permission
 Protocols: GSS/kerberos
 Category: auth
+Example: --delegation "none" $URL
 ---
 Set LEVEL to tell the server what it is allowed to delegate when it
 comes to user credentials.
index da8c01e26523c706992651badc8249e43bc4a8fd..193413777aee129980ae5299666b528c37101263 100644 (file)
@@ -4,6 +4,7 @@ Protocols: HTTP
 Mutexed: basic ntlm negotiate
 See-also: user proxy-digest anyauth
 Category: proxy auth http
+Example: -u name:password --digest $URL
 ---
 Enables HTTP Digest authentication. This is an authentication scheme that
 prevents the password from being sent over the wire in clear text. Use this in
index ffcf684e4a3f29c6168e3498bf8acb77213db8b6..38b3e0b3812c80caef1363a72b3873d31444bb56 100644 (file)
@@ -2,6 +2,7 @@ Long: disable-eprt
 Help: Inhibit using EPRT or LPRT
 Protocols: FTP
 Category: ftp
+Example: --disable-eprt ftp://example.com/
 ---
 Tell curl to disable the use of the EPRT and LPRT commands when doing active
 FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT
index dadef098b1cae29c85429f7de3ca9d683fabff22..281ec5c9d5f4565a332b60aea8073aa3e0aff431 100644 (file)
@@ -2,6 +2,7 @@ Long: disable-epsv
 Help: Inhibit using EPSV
 Protocols: FTP
 Category: ftp
+Example: --disable-epsv ftp://example.com/
 ---
 Tell curl to disable the use of the EPSV command when doing passive FTP
 transfers. Curl will normally always first attempt to use EPSV before
index d9096088449895fe3b56d70c063749f2f8b63896..3eb87f8d4dfdfad064fa28f05df34793208801f3 100644 (file)
@@ -2,6 +2,7 @@ Long: disable
 Short: q
 Help: Disable .curlrc
 Category: curl
+Example: -q $URL
 ---
 If used as the first parameter on the command line, the *curlrc* config
 file will not be read and used. See the --config for details on the default
index e124f675a96ea25ff4b919e8ef15248f381349cb..f3122aea56918abf511a5a8ff232d094542b9d06 100644 (file)
@@ -4,5 +4,7 @@ Protocols: HTTP
 Added: 7.61.0
 See-also: proto
 Category: curl http
+Example: --disallow-username-in-url $URL
 ---
-This tells curl to exit if passed a url containing a username.
+This tells curl to exit if passed a url containing a username. This is probably
+most useful when the URL is being provided at run-time or similar.
index 3cb818ae3e3dc286772a1e8ff4846be2aa3e0c54..fec7927eb6ec8edd263a75e2610511388f66bce0 100644 (file)
@@ -6,6 +6,7 @@ See-also: dns-ipv4-addr dns-ipv6-addr
 Added: 7.33.0
 Requires: c-ares
 Category: dns
+Example: --dns-interface eth0 $URL
 ---
 Tell curl to send outgoing DNS requests through <interface>. This option is a
 counterpart to --interface (which does not affect DNS). The supplied string
index 0d7bae6f0effbdf2c3118ff3accf164b0d05109c..e09153ab494d3d6293dc8598cef2309439dbd55f 100644 (file)
@@ -6,6 +6,7 @@ See-also: dns-interface dns-ipv6-addr
 Added: 7.33.0
 Requires: c-ares
 Category: dns
+Example: --dns-ipv4-addr 10.1.2.3 $URL
 ---
 Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
 the DNS requests originate from this address. The argument should be a
index a964dbb061761aee862160e40661132401a45382..954cb98b321d1b1428c4c510b8bd12ca6ce5ab30 100644 (file)
@@ -6,6 +6,7 @@ See-also: dns-interface dns-ipv4-addr
 Added: 7.33.0
 Requires: c-ares
 Category: dns
+Example: --dns-ipv6-addr 2a04:4e42::561 $URL
 ---
 Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
 the DNS requests originate from this address. The argument should be a
index a0954b31f00a417ffdfc820cad55023b0dfe7004..089473580f8e50b8751f7f561000ddedbe97dce9 100644 (file)
@@ -4,6 +4,7 @@ Help: DNS server addrs to use
 Requires: c-ares
 Added: 7.33.0
 Category: dns
+Example: --dns-servers 192.168.0.1,192.168.0.2 $URL
 ---
 Set the list of DNS servers to be used instead of the system default.
 The list of IP addresses should be separated with commas. Port numbers
index 1442fc8a96be9a0cdc2f15b276c9fbb597b0f61a..a760a6fb1f8b9dd5e427b95183878f1ba5d4aef7 100644 (file)
@@ -3,5 +3,6 @@ Help: Verify the status of the DoH server cert via OCSP-staple
 Protocols: all
 Added: 7.76.0
 Category: dns tls
+Example: --doh-cert-status --doh-url https://doh.example $URL
 ---
 Same as --cert-status but used for DoH (DNS-over-HTTPS).
index fe399a2f9e5a83b07eca88452341366b55b707d7..907a5dcd69ba09d071c2c2bd30097968b55cf717 100644 (file)
@@ -3,5 +3,6 @@ Help: Allow insecure DoH server connections
 Protocols: all
 Added: 7.76.0
 Category: dns tls
+Example: --doh-insecure --doh-url https://doh.example $URL
 ---
 Same as --insecure but used for DoH (DNS-over-HTTPS).
index 612945afa5c578454fac6b8efd43a6c7540b7ec3..80ff96ccc1524904fde0a1d9b91999a78fab4516 100644 (file)
@@ -4,6 +4,7 @@ Help: Resolve host names over DoH
 Protocols: all
 Added: 7.62.0
 Category: dns
+Example: --doh-url https://doh.example $URL
 ---
 Specifies which DNS-over-HTTPS (DoH) server to use to resolve hostnames,
 instead of using the default name resolver mechanism. The URL must be HTTPS.
index aa3bd9e33b4b9912088daa104cef15a26e84ddc1..62c92f44bba6d4ad18596b4669b9416d45db4058 100644 (file)
@@ -5,6 +5,7 @@ Help: Write the received headers to <filename>
 Protocols: HTTP FTP
 See-also: output
 Category: http ftp
+Example: --dump-header store.txt $URL
 ---
 Write the received protocol headers to the specified file. If no headers are
 received, the use of this option will create an empty file.
index 05ede9ad13844a6502098ffd38a6bf2b4e098032..2e99df4cd14cc213ff0e762bcf80380db7af65de 100644 (file)
@@ -4,6 +4,7 @@ Help: EGD socket path for random data
 Protocols: TLS
 See-also: random-file
 Category: tls
+Example: --egd-file /random/here $URL
 ---
 Specify the path name to the Entropy Gathering Daemon socket. The socket is
 used to seed the random engine for SSL connections.
index 034796c9a710a8e5f3de6aa8bc5556cdb941c422..8a2dcf7463bd8705e14da9ccc65cf8752b87a696 100644 (file)
@@ -3,6 +3,7 @@ Arg: <name>
 Help: Crypto engine to use
 Protocols: TLS
 Category: tls
+Example: --engine flavor $URL
 ---
 Select the OpenSSL crypto engine to use for cipher operations. Use --engine
 list to print a list of build-time supported engines. Note that not all (and
index c984cc9f867b0a07e17b0eac997919b5612bd4b5..fa16762876e08744477114ce804e61167845b4dd 100644 (file)
@@ -4,6 +4,7 @@ Help: Pass an ETag from a file as a custom header
 Protocols: HTTP
 Added: 7.68.0
 Category: http
+Example: --etag-compare etag.txt $URL
 ---
 This option makes a conditional HTTP request for the specific ETag read
 from the given file by sending a custom If-None-Match header using the
index dc2484c32673a661b5a53d87c321e7c1fbdda12a..8efad9044f0e1a02f9e30bdb64d1b8f820bec92f 100644 (file)
@@ -4,6 +4,7 @@ Help: Parse ETag from a request and save it to a file
 Protocols: HTTP
 Added: 7.68.0
 Category: http
+Example: --etag-save storetag.txt $URL
 ---
 This option saves an HTTP ETag to the specified file. An ETag is a
 caching related header, usually returned in a response.
index 431a529c297148ee0610ae9feaf5a1ff2c604e3d..8855edd0b7237caaba221c46ecff9e04462b767f 100644 (file)
@@ -5,6 +5,7 @@ Protocols: HTTP
 Added: 7.47.0
 See-also: connect-timeout
 Category: http
+Example: --expect100-timeout 2.5 -T file $URL
 ---
 Maximum time in seconds that you allow curl to wait for a 100-continue
 response when curl emits an Expects: 100-continue header in its request. By
index 3fbe238af205c7da686ef9606ac2cc10261b6052..aad15c3feb8fb9d5741a30fe0d1a58092c8c0a6d 100644 (file)
@@ -2,6 +2,7 @@ Long: fail-early
 Help: Fail on first transfer error, do not continue
 Added: 7.52.0
 Category: curl
+Example: --fail-early $URL https://two.example
 ---
 Fail and exit on the first detected transfer error.
 
index e27d459f9f7ef0da5c847668cd4f57f227a8aaf7..9b8c7db4ef13fc72e1a09cdf2f98d3bc987c8451 100644 (file)
@@ -4,6 +4,7 @@ Help: Fail on HTTP errors but save the body
 Category: http output
 Added: 7.76.0
 See-also: fail
+Example: --fail-with-body $URL
 ---
 Return an error on server errors where the HTTP response code is 400 or
 greater). In normal cases when an HTTP server fails to deliver a document, it
index d4d65fba4eda25df40f7612951bd3f7799b0dd28..a5e0c91e7ede96af95379f31e7acc4ede2aeb0ca 100644 (file)
@@ -4,6 +4,7 @@ Protocols: HTTP
 Help: Fail silently (no output at all) on HTTP errors
 See-also: fail-with-body
 Category: important http
+Example: --fail $URL
 ---
 Fail silently (no output at all) on server errors. This is mostly done to
 enable scripts etc to better deal with failed attempts. In normal cases
index abeff0eb5cfdee35b89089340ad30ca5d61a0941..de36962eea3df1f1bf2650a0c1a820f70fb890ad 100644 (file)
@@ -3,6 +3,7 @@ Help: Enable TLS False Start
 Protocols: TLS
 Added: 7.42.0
 Category: tls
+Example: --false-start $URL
 ---
 Tells curl to use false start during the TLS handshake. False start is a mode
 where a TLS client will start sending application data before verifying the
index 04d2578c55968476b8f70bf731f620947283c4a0..4f1a766bc7f522eb6304020f2c3bf9c90f848c5e 100644 (file)
@@ -4,6 +4,7 @@ Protocols: HTTP SMTP IMAP
 Arg: <name=string>
 See-also: form
 Category: http upload
+Example: --form-string "data" $URL
 ---
 Similar to --form except that the value string for the named parameter is used
 literally. Leading \&'@' and \&'<' characters, and the \&';type=' string in
index eec9aac72c9a0cff9f3735fd34d8104e72469b1d..06f2c553269489323f11bb8fc9d8eacea6fe55ed 100644 (file)
@@ -5,6 +5,7 @@ Help: Specify multipart MIME data
 Protocols: HTTP SMTP IMAP
 Mutexed: data head upload-file
 Category: http upload
+Example: --form "name=curl" --form "file=@loadthis" $URL
 ---
 For HTTP protocol family, this lets curl emulate a filled-in form in which a
 user has pressed the submit button. This causes curl to POST data using the
index bc04ba0472b668ae30b447f56df2b17697e8cfce..ce816f10d2b9ecf4e104b89096db912fc4a792e3 100644 (file)
@@ -4,6 +4,7 @@ Help: Account data string
 Protocols: FTP
 Added: 7.13.0
 Category: ftp auth
+Example: --ftp-account "mr.robot" ftp://example.com/
 ---
 When an FTP server asks for "account data" after user name and password has
 been provided, this data is sent off using the ACCT command.
index 1714849063de176bf36c5bad8470bc5dd7771a00..a5fb9853d22c6a2ec860d0bdea260ce11496b987 100644 (file)
@@ -4,6 +4,7 @@ Help: String to replace USER [name]
 Protocols: FTP
 Added: 7.15.5
 Category: ftp
+Example: --ftp-alternative-to-user "U53r" ftp://example.com
 ---
 If authenticating with the USER and PASS commands fails, send this command.
 When connecting to Tumbleweed's Secure Transport server over FTPS using a
index 5d9dfda46a3ebdfc6ef99d31ade8ec2a0eb5425d..579f8e36d89ca860e9d175976d60ee1c0159baf3 100644 (file)
@@ -3,6 +3,7 @@ Protocols: FTP SFTP
 Help: Create the remote dirs if not present
 See-also: create-dirs
 Category: ftp sftp curl
+Example: --ftp-create-dirs -T file ftp://example.com/remote/path/file
 ---
 When an FTP or SFTP URL/operation uses a path that doesn't currently exist on
 the server, the standard behavior of curl is to fail. Using this option, curl
index 149340b82f581259f33236adb1caf25615151831..4af0baf4234530fff83bc4cbf9ee202062b62f90 100644 (file)
@@ -4,6 +4,9 @@ Help: Control CWD usage
 Protocols: FTP
 Added: 7.15.1
 Category: ftp
+Example: --ftp-method multicwd ftp://example.com/dir1/dir2/file
+Example: --ftp-method nocwd ftp://example.com/dir1/dir2/file
+Example: --ftp-method singlecwd ftp://example.com/dir1/dir2/file
 ---
 Control what method curl should use to reach a file on an FTP(S)
 server. The method argument should be one of the following alternatives:
index cbd548de322c30d9e3113f8a1e11ff4274858f90..d920fefa6e724c7ffa68e22ca86b82915eed4231 100644 (file)
@@ -4,6 +4,7 @@ Protocols: FTP
 Added: 7.11.0
 See-also: disable-epsv
 Category: ftp
+Example: --ftp-pasv ftp://example.com/
 ---
 Use passive mode for the data connection. Passive is the internal default
 behavior, but using this option can be used to override a previous --ftp-port
index 9bb1d43f0eeb7a429b289734e0dcff9052693c4e..52e55e58f9069624ae16713bb9aec94703778d19 100644 (file)
@@ -5,6 +5,9 @@ Short: P
 Protocols: FTP
 See-also: ftp-pasv disable-eprt
 Category: ftp
+Example: -P - ftp:/example.com
+Example: -P eth0 ftp:/example.com
+Example: -P 192.168.0.2 ftp:/example.com
 ---
 Reverses the default initiator/listener roles when connecting with FTP. This
 option makes curl use active mode. curl then tells the server to connect back
index e9c7d251a6ce6656ad4b962d7becde10b7989ce0..453d8cf85871e2a0a9d824b5d6bbe95b4c2b10f9 100644 (file)
@@ -3,6 +3,7 @@ Help: Send PRET before PASV
 Protocols: FTP
 Added: 7.20.0
 Category: ftp
+Example: --ftp-pret ftp://example.com/
 ---
 Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers,
 mainly drftpd, require this non-standard command for directory listings as
index bcf4e7e62f2e86cc0a4c069857c0d94f1c2ebc5b..36f9e6da13c608c73959fc56a71694162e946726 100644 (file)
@@ -4,6 +4,7 @@ Protocols: FTP
 Added: 7.14.2
 See-also: ftp-pasv
 Category: ftp
+Example: --ftp-skip-pasv-ip ftp://example.com/
 ---
 Tell curl to not use the IP address the server suggests in its response
 to curl's PASV command when curl connects the data connection. Instead curl
index 6289e544a87e84c9139eb777ea959e2188008ae9..15ad1f54b00fab4fc6e45bc64ab383e7107eac63 100644 (file)
@@ -5,6 +5,7 @@ Protocols: FTP
 Added: 7.16.2
 See-also: ftp-ssl-ccc
 Category: ftp tls
+Example: --ftp-ssl-ccc-mode active --ftp-ssl-ccc ftps://example.com/
 ---
 Sets the CCC mode. The passive mode will not initiate the shutdown, but
 instead wait for the server to do it, and will not reply to the shutdown from
index 33cab4302a51d18fb900357d733d642849772817..bfaf431bbb3dee250f9b72bb43d288ac7d18068e 100644 (file)
@@ -4,6 +4,7 @@ Protocols: FTP
 See-also: ssl ftp-ssl-ccc-mode
 Added: 7.16.1
 Category: ftp tls
+Example: --ftp-ssl-ccc ftps://example.com/
 ---
 Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after
 authenticating. The rest of the control channel communication will be
index 5191353ddc64100dccb23d5de8d2a0cb66f09bb8..72dc080bcabb03cf07900ea78c02eb3659b8fac2 100644 (file)
@@ -3,6 +3,7 @@ Help: Require SSL/TLS for FTP login, clear for transfer
 Protocols: FTP
 Added: 7.16.0
 Category: ftp tls
+Example: --ftp-ssl-control ftp://example.com
 ---
 Require SSL/TLS for the FTP login, clear for transfer.  Allows secure
 authentication, but non-encrypted data transfers for efficiency.  Fails the
index e651f029a59bda64f77329dd90912144009205f4..c058987d412b13ecd67c5235577cbc2a782c1a6c 100755 (executable)
@@ -138,8 +138,11 @@ sub single {
     my $requires;
     my $category;
     my $seealso;
+    my @examples; # there can be more than one
     my $magic; # cmdline special option
+    my $line;
     while(<F>) {
+        $line++;
         if(/^Short: *(.)/i) {
             $short=$1;
         }
@@ -173,6 +176,9 @@ sub single {
         elsif(/^Category: *(.*)/i) {
             $category=$1;
         }
+        elsif(/^Example: *(.*)/i) {
+            push @examples, $1;
+        }
         elsif(/^Help: *(.*)/i) {
             ;
         }
@@ -185,6 +191,10 @@ sub single {
                 print STDERR "ERROR: no 'Category:' in $f\n";
                 exit 2;
             }
+            if(!$examples[0]) {
+                print STDERR "$f:$line:1:ERROR: no 'Example:' present\n";
+                exit 2;
+            }
             last;
         }
         else {
@@ -276,6 +286,16 @@ sub single {
         }
         push @foot, overrides($standalone, "This option overrides $mstr. ");
     }
+    if($examples[0]) {
+        my $s ="";
+        $s="s" if($examples[1]);
+        print "\nExample$s:\n.nf\n";
+        foreach my $e (@examples) {
+            $e =~ s!\$URL!https://example.com!g;
+            print " curl $e\n";
+        }
+        print ".fi\n";
+    }
     if($added) {
         push @foot, added($standalone, $added);
     }
index d529bb4e0bb66593726876f297586912fa6eabf6..e51c15563e4eeacd47a6ab38ac49ee30bf46a438 100644 (file)
@@ -2,6 +2,7 @@ Long: get
 Short: G
 Help: Put the post data in the URL and use GET
 Category: http upload
+Example: --get $URL
 ---
 When used, this option will make all data specified with --data, --data-binary
 or --data-urlencode to be used in an HTTP GET request instead of the POST
index 1db0fa264bf5fe46cae40e9b553a4d420f1713c2..ec2c7ae48a8c56a18e5d42b5803753ec9537e8bb 100644 (file)
@@ -2,6 +2,7 @@ Long: globoff
 Short: g
 Help: Disable URL sequences and ranges using {} and []
 Category: curl
+Example: -g "https://example.com/{[]}}}}"
 ---
 This option switches off the "URL globbing parser". When you set this option,
 you can specify URLs that contain the letters {}[] without having curl itself
index 1488a5a0400eced13fbadc07f4dc06463ca32edc..c3b2a51322b302063d0d823a0610aaf93d1dcb50 100644 (file)
@@ -3,6 +3,7 @@ Arg: <milliseconds>
 Help: Time for IPv6 before trying IPv4
 Added: 7.59.0
 Category: connection
+Example: --happy-eyeballs-timeout-ms 500 $URL
 ---
 Happy Eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6
 addresses for dual-stack hosts, giving IPv6 a head-start of the specified
index 835820465a551dbb8826b405fbeb272e89b2530b..446dc657223680fcc60b2bed644e4c3e3b50632e 100644 (file)
@@ -3,10 +3,11 @@ Help: Send HAProxy PROXY protocol v1 header
 Protocols: HTTP
 Added: 7.60.0
 Category: http proxy
+Example: --haproxy-protocol $URL
 ---
-Send a HAProxy PROXY protocol v1 header at the beginning of the connection. This
-is used by some load balancers and reverse proxies to indicate the client's
-true IP address and port.
+Send a HAProxy PROXY protocol v1 header at the beginning of the
+connection. This is used by some load balancers and reverse proxies to
+indicate the client's true IP address and port.
 
 This option is primarily useful when sending test requests to a service that
 expects this header.
index 6fe468511e17f90182b3fe2dfd87a8e58a5189a8..06d2489d5eaa0b52d7b18e03134074b830f14e73 100644 (file)
@@ -3,6 +3,7 @@ Short: I
 Help: Show document info only
 Protocols: HTTP FTP FILE
 Category: http ftp file
+Example: -I $URL
 ---
 Fetch the headers only! HTTP-servers feature the command HEAD which this uses
 to get nothing but the header of a document. When used on an FTP or FILE file,
index 121285ae37224a08140e5872931ed74d88715c22..11c96d5eae2f4b09e6218ca56f9ed611726ca434 100644 (file)
@@ -5,6 +5,9 @@ Help: Pass custom header(s) to server
 Protocols: HTTP
 Category: http
 See-also: user-agent referer
+Example: -H "X-First-Name: Joe" $URL
+Example: -H "User-Agent: yes-please/2000" $URL
+Example: -H "Host:" $URL
 ---
 Extra header to include in the request when sending HTTP to a server. You may
 specify any number of extra headers. Note that if you should add a custom
@@ -32,10 +35,6 @@ proxy. Added in 7.37.0.
 Passing on a "Transfer-Encoding: chunked" header when doing a HTTP request
 with a request body, will make curl send the data using chunked encoding.
 
-Example:
-
- curl -H "X-First-Name: Joe" http://example.com/
-
 **WARNING**: headers set with this option will be set in all requests - even
 after redirects are followed, like when told with --location. This can lead to
 the header being sent to other hosts than the original host, so sensitive
index b7c68233a1e0f8bd5134c260eb341f5d138c55eb..28ae868d2ff9f730de8a971f38877e7aacd1629e 100644 (file)
@@ -3,6 +3,7 @@ Arg: <category>
 Short: h
 Help: Get help for commands
 Category: important curl
+Example: --help all
 ---
 Usage help. This lists all commands of the <category>.
 If no arg was provided, curl will display the most important
index c926ed8b5051f35a7d515e1ed96249dfb9cee57c..833db950c7e8e6bbf912c50378417d70cefc9415 100644 (file)
@@ -4,6 +4,7 @@ Help: Acceptable MD5 hash of the host public key
 Protocols: SFTP SCP
 Added: 7.17.1
 Category: sftp scp
+Example: --hostpubmd5 e5c1c49020640a5ab0f2034854c321a8 sftp://example.com/
 ---
 Pass a string containing 32 hexadecimal digits. The string should
 be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
index 2399084bfcd367bdb054b92cfacb588e1919c37d..f9cd453dac6d7fcae0de38384351a731ba0b96d1 100644 (file)
@@ -4,9 +4,8 @@ Protocols: HTTPS
 Help: Enable HSTS with this cache file
 Added: 7.74.0
 Category: http
+Example: --hsts cache.txt $URL
 ---
-WARNING: this option is experimental. Do not use in production.
-
 This option enables HSTS for the transfer. If the file name points to an
 existing HSTS cache file, that will be used. After a completed transfer, the
 cache will be saved to the file name again if it has been modified.
index 954c22a17ad567ab52816ccf31da9b5e1c072ad2..7c45d565a8f55d3fec263a531e382c1a0e7cac40 100644 (file)
@@ -4,6 +4,7 @@ Protocols: HTTP
 Added:
 Help: Allow HTTP 0.9 responses
 Category: http
+Example: --http0.9 $URL
 ---
 Tells curl to be fine with HTTP version 0.9 response.
 
index a4059dbf0f341ae2a7a6b5aef19b04267271d28b..cbfbaee40dc5ac0c17b8ab212e7ab1205c73341b 100644 (file)
@@ -6,6 +6,7 @@ Added:
 Mutexed: http1.1 http2
 Help: Use HTTP 1.0
 Category: http
+Example: --http1.0 $URL
 ---
 Tells curl to use HTTP version 1.0 instead of using its internally preferred
 HTTP version.
index a71a40bab2f4adf144f104420853669eb4fdcc13..01fa76d332e0abfb79e63af9b84a7ebfc00d1cb9 100644 (file)
@@ -5,5 +5,6 @@ Added: 7.33.0
 Mutexed: http1.0 http2
 Help: Use HTTP 1.1
 Category: http
+Example: --http1.1 $URL
 ---
 Tells curl to use HTTP version 1.1.
index ea2906edb465c3f4aa085ca2c23125b51cae9aa4..e3b32f6ba4a259488d4d55a70c011646296c22a4 100644 (file)
@@ -6,6 +6,7 @@ Mutexed: http1.1 http1.0 http2
 Requires: HTTP/2
 Help: Use HTTP 2 without HTTP/1.1 Upgrade
 Category: http
+Example: --http2-prior-knowledge $URL
 ---
 Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1
 Upgrade. It requires prior knowledge that the server supports HTTP/2 straight
index 197515ee8cbc7607f13dffff62e55e861b429485..2a85db600d756b15724d8178429b97bf85c59181 100644 (file)
@@ -8,5 +8,12 @@ See-also: no-alpn
 Help: Use HTTP 2
 See-also: http1.1 http3
 Category: http
+Example: --http2 $URL
 ---
 Tells curl to use HTTP version 2.
+
+For HTTPS, this means curl will attempt to negotiate HTTP/2 in the TLS
+handshake. curl does this by default.
+
+For HTTP, this means curl will attempt to upgrade the request to HTTP/2 using
+the Upgrade: request header.
index 50630798f1b780e4a501106f30817ddf8eaf26f8..f6c92b39a60c8eaeca78a5f33c00cf6bda90b1d4 100644 (file)
@@ -7,8 +7,9 @@ Requires: HTTP/3
 Help: Use HTTP v3
 See-also: http1.1 http2
 Category: http
+Example: --http3 $URL
 ---
-WARNING: this option is experimental. Do not use in production.
+**WARNING**: this option is experimental. Do not use in production.
 
 Tells curl to use HTTP version 3 directly to the host and port number used in
 the URL. A normal HTTP/3 transaction will be done to a host and then get
index 2555ccaaefddfbd265d8544899e15c85f746fabf..8a4c24754a44cf801f693868e86627c1d12099b4 100644 (file)
@@ -2,6 +2,7 @@ Long: ignore-content-length
 Help: Ignore the size of the remote resource
 Protocols: FTP HTTP
 Category: http ftp
+Example: --ignore-content-length $URL
 ---
 For HTTP, Ignore the Content-Length header. This is particularly useful for
 servers running Apache 1.x, which will report incorrect Content-Length for
index 250d4accfd0c215d679715253a11133c17d00c83..80a05e0c86b46707df81ccee07867b279f145796 100644 (file)
@@ -3,6 +3,7 @@ Short: i
 Help: Include protocol response headers in the output
 See-also: verbose
 Category: important verbose
+Example: -i $URL
 ---
 Include the HTTP response headers in the output. The HTTP response headers can
 include things like server name, cookies, date of the document, HTTP version
index 443ddd5074113ac23f1148006a9a756c1699d8e1..fb2c17d8bb8f9b65cb8468b8b0af73296dbad043 100644 (file)
@@ -4,6 +4,7 @@ Help: Allow insecure server connections when using SSL
 Protocols: TLS
 See-also: proxy-insecure cacert
 Category: tls
+Example: --insecure $URL
 ---
 By default, every SSL connection curl makes is verified to be secure. This
 option allows curl to proceed and operate even for server connections
@@ -14,3 +15,5 @@ contains the right name and verifies successfully using the cert store.
 
 See this online resource for further details:
  https://curl.se/docs/sslcerts.html
+
+**WARNING**: this makes the transfer insecure.
index 196e7efa34f7486a7989766566cc4c60214a1d58..b2c8eeec5ebff9eb82c9b063b2e171647a3d58f8 100644 (file)
@@ -3,6 +3,7 @@ Arg: <name>
 Help: Use network INTERFACE (or address)
 See-also: dns-interface
 Category: connection
+Example: --interface eth0 $URL
 ---
 
 Perform an operation using a specified interface. You can enter interface
index a6691376a6092cec789a21d3e539a824c7190c2b..90a6dda007865bbde08ef42076555d7b79ad1727 100644 (file)
@@ -8,6 +8,7 @@ Requires:
 See-also: http1.1 http2
 Help: Resolve names to IPv4 addresses
 Category: connection dns
+Example: --ipv4 $URL
 ---
 This option tells curl to resolve names to IPv4 addresses only, and not for
 example try IPv6.
index ce0415caa91566e81d3b3ef44a4dc59dd6056297..dfa79abab33bcbb13eb99ff866cd6eb8b10f09e7 100644 (file)
@@ -8,6 +8,7 @@ Requires:
 See-also: http1.1 http2
 Help: Resolve names to IPv6 addresses
 Category: connection dns
+Example: --ipv6 $URL
 ---
 This option tells curl to resolve names to IPv6 addresses only, and not for
 example try IPv4.
index 993b77fa820aefae688de355c8ad40cc3400980c..0cc342c72010f2c1ce0b9ac1feddd1f4c8d95094 100644 (file)
@@ -4,6 +4,7 @@ Help: Ignore session cookies read from file
 Protocols: HTTP
 See-also: cookie cookie-jar
 Category: http
+Example: --junk-session-cookies -b cookies.txt $URL
 ---
 When curl is told to read cookies from a given file, this option will make it
 discard all "session cookies". This will basically have the same effect as if
index 41261535c835a08960a8004ee024dbd0caa7e941..1b96c4dc5fe509d41ead20edd94e4561b5112db8 100644 (file)
@@ -3,6 +3,7 @@ Arg: <seconds>
 Help: Interval time for keepalive probes
 Added: 7.18.0
 Category: connection
+Example: --keepalive-time 20 $URL
 ---
 This option sets the time a connection needs to remain idle before sending
 keepalive probes and the time between individual keepalive probes. It is
index 50a068676ad77c6075bb7e4a857acaf6f794fb70..4baa9afa29a6b2a34b4a3e3dfee4c99d5223b191 100644 (file)
@@ -3,6 +3,7 @@ Arg: <type>
 Help: Private key file type (DER/PEM/ENG)
 Protocols: TLS
 Category: tls
+Example: --key-type DER --key here $URL
 ---
 Private key file type. Specify which type your --key provided private key
 is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
index a762e6fafe9700f6ee95ef7281e1b66ae7f684ba..d7f5e22a6a750755dc4cc36a8904b1cedf264b68 100644 (file)
@@ -3,6 +3,7 @@ Arg: <key>
 Protocols: TLS SSH
 Help: Private key file name
 Category: tls ssh
+Example: --cert certificate --key here $URL
 ---
 Private key file name. Allows you to provide your private key in this separate
 file. For SSH, if not specified, curl tries the following candidates in order:
index 7759cfb04be5d041a93b55459fe4f122a6aa387d..3d9ce999e9a43c9e30ee613f0a0b30f240e01d4c 100644 (file)
@@ -4,6 +4,7 @@ Help: Enable Kerberos with security <level>
 Protocols: FTP
 Requires: Kerberos
 Category: ftp
+Example: --krb clear ftp://example.com/
 ---
 Enable Kerberos authentication and use. The level must be entered and should
 be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a
index 40160824ace95f6dd4252f4badc99476f636cee9..b7371fffe20977ccb1531c537b273f961192feeb 100644 (file)
@@ -3,6 +3,7 @@ Arg: <file>
 Help: Dump libcurl equivalent code of this command line
 Added: 7.16.1
 Category: curl
+Example: --libcurl client.c $URL
 ---
 Append this option to any ordinary curl command line, and you will get
 libcurl-using C source code written to the file that does the equivalent
index 66f5cdaac3e39ef4a8fcaa1ef1af4201a09266f1..7c46e544a34be13805b7b9d27c797e30db76671f 100644 (file)
@@ -2,6 +2,9 @@ Long: limit-rate
 Arg: <speed>
 Help: Limit transfer speed to RATE
 Category: connection
+Example: --limit-rate 100K $URL
+Example: --limit-rate 1000 $URL
+Example: --limit-rate 10M $URL
 ---
 Specify the maximum transfer rate you want curl to use - for both downloads
 and uploads. This feature is useful if you have a limited pipe and you'd like
index ac39906929a89c4775d01773b969be94a50037d2..29f9ba2f3c3456722e5df619180d6ec7f844c296 100644 (file)
@@ -4,6 +4,7 @@ Protocols: FTP POP3
 Help: List only mode
 Added: 4.0
 Category: ftp pop3
+Example: --list-only ftp://example.com/dir/
 ---
 (FTP)
 When listing an FTP directory, this switch forces a name-only view. This is
index 3f7a0e024a3dab7ece3292feb7cd0e87e58ff932..77664170032a2d5de617467fca0ccf0aedf13fbf 100644 (file)
@@ -3,6 +3,7 @@ Arg: <num/range>
 Help: Force use of RANGE for local port numbers
 Added: 7.15.2
 Category: connection
+Example: --local-port 1000-3000 $URL
 ---
 Set a preferred single number or range (FROM-TO) of local port numbers to use
 for the connection(s).  Note that port numbers by nature are a scarce resource
index f01d842bc5e610894f96936ad5e0a027034fffaa..98c49ffe194c18722ab969f5874f56f9aa271e92 100644 (file)
@@ -3,6 +3,7 @@ Help: Like --location, and send auth to other hosts
 Protocols: HTTP
 See-also: user
 Category: http auth
+Example: --location-trusted -u user:password $URL
 ---
 Like --location, but will allow sending the name + password to all hosts that
 the site may redirect to. This may or may not introduce a security breach if
index 6bf763d3ade28850c516e5abc0d007bed82e4ab5..08c939c15d6ce32fcc0d64f1786f152c229c02e8 100644 (file)
@@ -3,6 +3,7 @@ Short: L
 Help: Follow redirects
 Protocols: HTTP
 Category: http
+Example: -L $URL
 ---
 If the server reports that the requested page has moved to a different
 location (indicated with a Location: header and a 3XX response code), this
index b12246885b691b505e84f35f2ccd5ee479704c64..de7728854e541f2f03557e9c81429a4568993c8d 100644 (file)
@@ -4,6 +4,7 @@ Protocols: IMAP POP3 SMTP
 Help: Server login options
 Added: 7.34.0
 Category: imap pop3 smtp auth
+Example: --login-options 'AUTH=*' imap://example.com
 ---
 Specify the login options to use during server authentication.
 
index 529997161dd8bf210745066d89f22894f3441528..49a02d5baa709d5af12ef17c552e9645d7144e95 100644 (file)
@@ -5,6 +5,7 @@ Help: Originator address of the original email
 Added: 7.25.0
 See-also: mail-rcpt mail-from
 Category: smtp
+Example: --mail-auth user@example.come -T mail smtp://example.com/
 ---
 Specify a single address. This will be used to specify the authentication
 address (identity) of a submitted message that is being relayed to another
index faf48e2a4b02754a34b2f3c27d5a601932a10b7d..be0547c9f2fa71a7a3966630492b0d4ab1a7ef2b 100644 (file)
@@ -5,5 +5,6 @@ Protocols: SMTP
 Added: 7.20.0
 See-also: mail-rcpt mail-auth
 Category: smtp
+Example: --mail-from user@example.com -T mail smtp://example.com/
 ---
 Specify a single address that the given mail should get sent from.
index e96be3e711ebbad37dc94e8d75542bce2a44ea05..36d555e17c48d3f97b64f73ba5cc388edf4db199 100644 (file)
@@ -3,6 +3,7 @@ Help: Allow RCPT TO command to fail for some recipients
 Protocols: SMTP
 Added: 7.69.0
 Category: smtp
+Example: --mail-rcpt-allowfails --mail-rcpt dest@example.com smtp://example.com
 ---
 When sending data to multiple recipients, by default curl will abort SMTP
 conversation if at least one of the recipients causes RCPT TO command to
index d464bb41b47d0fb909c495cc39e53609a79c8aba..d4a2502eea70e5c0721dc3bd5a081f968e5a1b57 100644 (file)
@@ -4,6 +4,7 @@ Help: Mail to this address
 Protocols: SMTP
 Added: 7.20.0
 Category: smtp
+Example: --mail-rcpt user@example.net smtp://example.com
 ---
 Specify a single e-mail address, user name or mailing list name. Repeat this
 option several times to send to multiple recipients.
index 25ed08dd274765b47d0dd6b7e93b0be1336d8e6c..c81754b7a7a608defdeed4f14c55d1b739c7ebf3 100644 (file)
@@ -2,5 +2,6 @@ Long: manual
 Short: M
 Help: Display the full manual
 Category: curl
+Example: --manual
 ---
 Manual. Display the huge help text.
index 6717f2d95458585ae2f04f4a28657992db1ce8eb..0f8aca42e2cf3a91a03c3fb771495c4968ca4e4e 100644 (file)
@@ -4,6 +4,7 @@ Help: Maximum file size to download
 Protocols: FTP HTTP MQTT
 See-also: limit-rate
 Category: connection
+Example: --max-filesize 100K $URL
 ---
 Specify the maximum size (in bytes) of a file to download. If the file
 requested is larger than this value, the transfer will not start and curl will
index 1b5de5bc138a96da352aa0e8e94aa6690df13155..eade17f7bccecd8eb5a535f2cb6803ff746f4ec6 100644 (file)
@@ -3,6 +3,7 @@ Arg: <num>
 Help: Maximum number of redirects allowed
 Protocols: HTTP
 Category: http
+Example: --max-redirs 3 --location $URL
 ---
 Set maximum number of redirections to follow. When --location is used, to
 prevent curl from following too many redirects, by default, the limit is
index c4e4ed7eb48c2b37781f3ab358f1d9f43de3e40c..cb86fa9fcd59455cb62c32b9369739cfc3e01d3a 100644 (file)
@@ -1,9 +1,11 @@
 Long: max-time
 Short: m
-Arg: <seconds>
-Help: Maximum time allowed for the transfer
+Arg: <fractional seconds>
+Help: Maximum time allowed for transfer
 See-also: connect-timeout
 Category: connection
+Example: --max-time 10 $URL
+Example: --max-time 2.92 $URL
 ---
 Maximum time in seconds that you allow the whole operation to take.  This is
 useful for preventing your batch jobs from hanging for hours due to slow
index 4725b389adf74bbdd1e265cac69a60d4dd2b6ad9..1fc10874213ba7783babec9ede0046280388e3b7 100644 (file)
@@ -2,6 +2,7 @@ Long: metalink
 Help: Process given URLs as metalink XML file
 Added: 7.27.0
 Category: misc
+Example: --metalink file $URL
 ---
 This option was previously used to specify a metalink resource. Metalink
 support has been disabled in curl since 7.78.0 for security reasons.
index e247bfbee5b2d5c91f2cc66f747321715d3362de..e862bc82026bba6e2422d7067cc10eea953b64c5 100644 (file)
@@ -3,6 +3,7 @@ Help: Use HTTP Negotiate (SPNEGO) authentication
 Protocols: HTTP
 See-also: basic ntlm anyauth proxy-negotiate
 Category: auth http
+Example: --negotiate -u : $URL
 ---
 Enables Negotiate (SPNEGO) authentication.
 
index 95fb2654a2418fc1761221766d61124fa5a7c6c8..df89d51f54946b3f54bfdcb714f7e519058f839d 100644 (file)
@@ -4,6 +4,7 @@ Arg: <filename>
 Added: 7.21.5
 Mutexed: netrc
 Category: curl
+Example: --netrc-file netrc $URL
 ---
 This option is similar to --netrc, except that you provide the path (absolute
 or relative) to the netrc file that curl should use.  You can only specify one
index e0b59d19b87cc2f6df0d6b5509d299b16a2b2736..3869a2009b6b3e9a770253d8895fa5e1df716622 100644 (file)
@@ -3,6 +3,7 @@ Help: Use either .netrc or URL
 Mutexed: netrc
 See-also: netrc-file
 Category: curl
+Example: --netrc-optional $URL
 ---
 Very similar to --netrc, but this option makes the .netrc usage **optional**
 and not mandatory as the --netrc option does.
index a31e2ede32ca6082eefb73db3196c27d0e521d1a..21e33a164a804f72908a650537ead7ccc4f1c3de 100644 (file)
@@ -2,6 +2,7 @@ Long: netrc
 Short: n
 Help: Must read .netrc for user name and password
 Category: curl
+Example: --netrc $URL
 ---
 Makes curl scan the *.netrc* (*_netrc* on Windows) file in the user's home
 directory for login name and password. This is typically used for FTP on
index 1adcc7535c1377834de1f7fa22aa3a5416d33714..bcbad68e58a5589707a5fea0374e5d1b5d3ea595 100644 (file)
@@ -6,6 +6,8 @@ Added: 7.36.0
 Magic: divider
 Help: Make next URL use its separate set of options
 Category: curl
+Example: $URL --next -d postthis www2.example.com
+Example: -I $URL --next https://example.net/
 ---
 Tells curl to use a separate operation for the following URL and associated
 options. This allows you to send several URL requests, each with their own
@@ -18,4 +20,6 @@ options include --verbose, --trace, --trace-ascii and --fail-early.
 
 For example, you can do both a GET and a POST in a single command line:
 
+.nf
  curl www1.example.com --next -d postthis www2.example.com
+.fi
index 8031b4f07987bae5699298d42f83b37e51c3a4ca..bc620763235414806f9bf8dc777bf152e606eb2a 100644 (file)
@@ -6,6 +6,7 @@ See-also: no-npn http2
 Requires: TLS
 Help: Disable the ALPN TLS extension
 Category: tls http
+Example: --no-alpn $URL
 ---
 Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
 with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
index 1079f47128cfc7ddec6718558a4d1358cdce4eec..fe8da4e9645e33e3ca862ef28c50f11733ee919a 100644 (file)
@@ -2,6 +2,7 @@ Long: no-buffer
 Short: N
 Help: Disable buffering of the output stream
 Category: curl
+Example: --no-buffer $URL
 ---
 Disables the buffering of the output stream. In normal work situations, curl
 will use a standard buffered output stream that will have the effect that it
index 72f3bc9a5bc992b4ffa416ca78c3243651150d3a..a264b7ac586c466405520e97e63852fc21278e44 100644 (file)
@@ -1,6 +1,7 @@
 Long: no-keepalive
 Help: Disable TCP keepalive on the connection
 Category: connection
+Example: --no-keepalive $URL
 ---
 Disables the use of keepalive messages on the TCP connection. curl otherwise
 enables them by default.
index 27e5974bdf7bfd1a15f1ebb0204fc97eebebd89c..7a9239d361c6b2d554167f8acf5fb2b35de881af 100644 (file)
@@ -7,6 +7,7 @@ See-also: no-alpn http2
 Requires: TLS
 Help: Disable the NPN TLS extension
 Category: tls http
+Example: --no-npn $URL
 ---
 Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
 with an SSL library that supports NPN. NPN is used by a libcurl that supports
index bf28d635d5f209d3bd97b9d94f233c7ae2bad227..9c7413eeb9d160bf857ce854b4d5618970bbdbf8 100644 (file)
@@ -3,6 +3,7 @@ Help: Do not show the progress meter
 See-also: verbose silent
 Added: 7.67.0
 Category: verbose
+Example: --no-progress-meter -o store $URL
 ---
 Option to switch off the progress meter output without muting or otherwise
 affecting warning and informational messages like --silent does.
index 013ca4cb47e7958f2840e4bad04239c92556b47c..70a32210ecddc3fa8664f5a3a6acda6161f75b08 100644 (file)
@@ -3,6 +3,7 @@ Help: Disable SSL session-ID reusing
 Protocols: TLS
 Added: 7.16.0
 Category: tls
+Example: --no-sessionid $URL
 ---
 Disable curl's use of SSL session-ID caching.  By default all transfers are
 done using the cache. Note that while nothing should ever get hurt by
index c49e6d180edbbf01de3d8636430cce2293a781df..ee0978e03997f5c0781658b75e2197b45dd4ce17 100644 (file)
@@ -3,6 +3,7 @@ Arg: <no-proxy-list>
 Help: List of hosts which do not use proxy
 Added: 7.19.4
 Category: proxy
+Example: --noproxy "www.example" $URL
 ---
 Comma-separated list of hosts for which not to use a proxy, if one is
 specified. The only wildcard is a single * character, which matches all hosts,
index 4a2f7e1e6a0ff8f262290d4e038fdeea38f20e97..890137062cc7cbaef747c74ac26c40acc6b82c54 100644 (file)
@@ -3,6 +3,7 @@ Help: Use HTTP NTLM authentication with winbind
 Protocols: HTTP
 See-also: ntlm proxy-ntlm
 Category: auth http
+Example: --ntlm-wb -u user:password $URL
 ---
 Enables NTLM much in the style --ntlm does, but hand over the authentication
 to the separate binary ntlmauth application that is executed when needed.
index c63c086ebe409897df036348b3e760e2ceda4f9a..5a50632678b26a1c002fadfff7b481d29d7b9a73 100644 (file)
@@ -5,6 +5,7 @@ See-also: proxy-ntlm
 Protocols: HTTP
 Requires: TLS
 Category: auth http
+Example: --ntlm -u user:password $URL
 ---
 Enables NTLM authentication. The NTLM authentication method was designed by
 Microsoft and is used by IIS web servers. It is a proprietary protocol,
index e0ea210ed8a0fb7ad4b3c7f08a54db136220a696..1662a366cd669fbc18db1e6296eab9abea518aa2 100644 (file)
@@ -3,6 +3,7 @@ Help: OAuth 2 Bearer Token
 Arg: <token>
 Protocols: IMAP POP3 SMTP HTTP
 Category: auth
+Example: --oauth2-bearer "mF_9.B5f-4.1JqM" $URL
 ---
 Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
 is used in conjunction with the user name which can be specified as part of
index d2ff7738efca5ce5f19b2827d00ae9bfb00cffad..1664f4590f3a8ebe05660299789e4a61b36958fe 100644 (file)
@@ -4,6 +4,7 @@ Help: Directory to save files in
 Added: 7.73.0
 See-also: remote-name remote-header-name
 Category: curl
+Example: --output-dir "tmp" -O $URL
 ---
 
 This option specifies the directory in which files should be stored, when
index d639a235123334f426b0f65265fa42b514cb9721..ce9749d5db7c768ec7ced5ad476b55b012c297de 100644 (file)
@@ -4,6 +4,10 @@ Short: o
 Help: Write to file instead of stdout
 See-also: remote-name remote-name-all remote-header-name
 Category: important curl
+Example: -o file $URL
+Example: "http://{one,two}.example.com" -o "file_#1.txt"
+Example: "http://{site,host}.host[1-5].com" -o "#1_#2"
+Example: -o file $URL -o file2 https://example.net
 ---
 Write output to <file> instead of stdout. If you are using {} or [] to fetch
 multiple documents, you should quote the URL and you can use '#' followed by a
index 47b9a7900a7e3f8c18a3ad2bb891b61341f99c96..4f7468de658df107006bf977b923e37c91b8cced 100644 (file)
@@ -3,6 +3,7 @@ Help: Do not wait for multiplexing (with --parallel)
 Added: 7.68.0
 See-also: parallel parallel-max
 Category: connection curl
+Example: --parallel-immediate -Z $URL -o file1 $URL -o file2
 ---
 When doing parallel transfers, this option will instruct curl that it should
 rather prefer opening up more connections in parallel at once rather than
index 9ec807cddad06fd5b0309f449570d8981804f361..1f22fcb7d23af9ea5033048fceccabe10b545455 100644 (file)
@@ -4,6 +4,7 @@ Help: Maximum concurrency for parallel transfers
 Added: 7.66.0
 See-also: parallel
 Category: connection curl
+Example: --parallel-max 100 -Z $URL ftp://example.com/
 ---
 When asked to do parallel transfers, using --parallel, this option controls
 the maximum amount of transfers to do simultaneously.
index d49158c24291f4be9bf9ddd2ea0d38ec1d90797b..2a0ca4340fec9c76e634549377741ca2e214b228 100644 (file)
@@ -3,6 +3,7 @@ Long: parallel
 Help: Perform transfers in parallel
 Added: 7.66.0
 Category: connection curl
+Example: --parallel $URL -o file1 $URL -o file2
 ---
 Makes curl perform its transfers in parallel as compared to the regular serial
 manner.
index e3fb97ae6176a33d5bd5839a3f6919fbc1b14e20..58e355827ba4d46b75d4559b923d951261feaa8f 100644 (file)
@@ -3,6 +3,7 @@ Arg: <phrase>
 Help: Pass phrase for the private key
 Protocols: SSH TLS
 Category: ssh tls auth
+Example: --pass secret --key file $URL
 ---
 Passphrase for the private key.
 
index 0bfaf6639ba42d07f8edeed302c2a6ed37ab2aab..fb87def947c26d52e56dc22c4a0d5e9b5f1a40ae 100644 (file)
@@ -2,6 +2,7 @@ Long: path-as-is
 Help: Do not squash .. sequences in URL path
 Added: 7.42.0
 Category: curl
+Example: --path-as-is https://example.com/../../etc/passwd
 ---
 Tell curl to not handle sequences of /../ or /./ in the given URL
 path. Normally curl will squash or merge them according to standards but with
index 4e0ed5edde5645b1f0476921a3d9e47fb4a97555..dc98b29f846adce2aff8ebbc5dec795a72424460 100644 (file)
@@ -3,6 +3,8 @@ Arg: <hashes>
 Help: FILE/HASHES Public key to verify peer against
 Protocols: TLS
 Category: tls
+Example: --pinnedpubkey keyfile $URL
+Example: --pinnedpubkey 'sha256//ce118b51897f4452dc' $URL
 ---
 Tells curl to use the specified public key file (or hashes) to verify the
 peer. This can be a path to a file which contains a single public key in PEM
index 64ead05360121dec5844ec422089e8742db583b1..744ef5813ad727324f0066e694ce130911e2e173 100644 (file)
@@ -4,6 +4,7 @@ Protocols: HTTP
 See-also: post302 post303 location
 Added: 7.17.1
 Category: http post
+Example: --post301 --location -d "data" $URL
 ---
 Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET
 requests when following a 301 redirection. The non-RFC behavior is ubiquitous
index d73cb9dcd7588193958dc6c1bfbf69c84007099c..2c6d4b615c56f1c85782091e33b2e473a51fa31b 100644 (file)
@@ -4,6 +4,7 @@ Protocols: HTTP
 See-also: post301 post303 location
 Added: 7.19.1
 Category: http post
+Example: --post302 --location -d "data" $URL
 ---
 Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET
 requests when following a 302 redirection. The non-RFC behavior is ubiquitous
index 1a67e13efd284080c1d2fcbb00d5a8509c111778..a2fec18c4be196187e352ea55635912f4354bae5 100644 (file)
@@ -4,6 +4,7 @@ Protocols: HTTP
 See-also: post302 post301 location
 Added: 7.26.0
 Category: http post
+Example: --post303 --location -d "data" $URL
 ---
 Tells curl to violate RFC 7231/6.4.4 and not convert POST requests into GET
 requests when following 303 redirections. A server may require a POST to
index a917c16ed8874c2e2a9bb9568e7057762a05de51..c91565c0e78773fe502273b8a5910c736a1e68f1 100644 (file)
@@ -3,6 +3,7 @@ Arg: [protocol://]host[:port]
 Help: Use this proxy first
 Added: 7.52.0
 Category: proxy
+Example: --preproxy socks5://proxy.example -x http://http.example $URL
 ---
 Use the specified SOCKS proxy before connecting to an HTTP or HTTPS --proxy. In
 such a case curl first connects to the SOCKS proxy and then connects (through
index ad2f21b87e70045066c11dd0d8d264714dab622a..96ac3009b1ddee438695c757590c2f25ab463fae 100644 (file)
@@ -2,6 +2,7 @@ Short: #
 Long: progress-bar
 Help: Display transfer progress as a bar
 Category: verbose
+Example: -# -O $URL
 ---
 Make curl display transfer progress as a simple progress bar instead of the
 standard, more informational, meter.
index 74d3932cf95b1231d8857345f399c265d6bf84dc..a659b840dc5fb701d35e0d6a31fd5298ea21bf9a 100644 (file)
@@ -3,17 +3,14 @@ Help: Use PROTOCOL for any URL missing a scheme
 Arg: <protocol>
 Added: 7.45.0
 Category: connection curl
+Example: --proto-default https ftp.example.com
 ---
 Tells curl to use *protocol* for any URL missing a scheme name.
 
-Example:
-
- curl --proto-default https ftp.mozilla.org
-
 An unknown or unsupported protocol causes error
 *CURLE_UNSUPPORTED_PROTOCOL* (1).
 
 This option does not change the default proxy protocol (http).
 
-Without this option curl would make a guess based on the host, see --url for
-details.
+Without this option set, curl guesses protocol based on the host name, see
+--url for details.
index 10580ad834beb29c698c7e61929ba844bb6749c2..81d495dd8f3c234ab88b7c75c8b405a89731443e 100644 (file)
@@ -3,6 +3,7 @@ Arg: <protocols>
 Help: Enable/disable PROTOCOLS on redirect
 Added: 7.20.2
 Category: connection curl
+Example: --proto-redir =http,https $URL
 ---
 Tells curl to limit what protocols it may use on redirect. Protocols denied by
 --proto are not overridden by this option. See --proto for how protocols are
index 1e269a56cedd0a029b63c3a10fd09a39ce74d08e..6ff52c41740f4446016f4b7ffa110e2573cec9d2 100644 (file)
@@ -4,6 +4,7 @@ Help: Enable/disable PROTOCOLS
 See-also: proto-redir proto-default
 Added: 7.20.2
 Category: connection curl
+Example: --proto =http,https,sftp $URL
 ---
 Tells curl to limit what protocols it may use for transfers. Protocols are
 evaluated left to right, are comma separated, and are each a protocol name or
index 6410c0e6acaaf640bc7ba49a6306299e09f404a8..80f2b970125cb49fd23521df7377209da6d38491 100644 (file)
@@ -3,6 +3,7 @@ Help: Pick any proxy authentication method
 Added: 7.13.2
 See-also: proxy proxy-basic proxy-digest
 Category: proxy auth
+Example: --proxy-anyauth --proxy-user user:passwd -x proxy $URL
 ---
 Tells curl to pick a suitable authentication method when communicating with
 the given HTTP proxy. This might cause an extra request/response round-trip.
index e842f9900107e82fdc8894c9003522143de0c0c8..6d38c733a027578780fb1472922058f6e12fc5d3 100644 (file)
@@ -2,6 +2,7 @@ Long: proxy-basic
 Help: Use Basic authentication on the proxy
 See-also: proxy proxy-anyauth proxy-digest
 Category: proxy auth
+Example: --proxy-basic --proxy-user user:passwd -x proxy $URL
 ---
 Tells curl to use HTTP Basic authentication when communicating with the given
 proxy. Use --basic for enabling HTTP Basic with a remote host. Basic is the
index bbc731a28f75a43e1033c7ecdab6c2d821adbba9..5c3294475804a54ea315888b4ff1b7c46afff06b 100644 (file)
@@ -4,5 +4,6 @@ Arg: <file>
 Added: 7.52.0
 See-also: proxy-capath cacert capath proxy
 Category: proxy tls
+Example: --proxy-cacert CA-file.txt -x https://proxy $URL
 ---
 Same as --cacert but used in HTTPS proxy context.
index cc342b755e8e0952a58655bdcbed990384257d6c..0429984f2a168adc1914916967309f9a78746350 100644 (file)
@@ -4,5 +4,6 @@ Arg: <dir>
 Added: 7.52.0
 See-also: proxy-cacert proxy capath
 Category: proxy tls
+Example: --proxy-capath /local/directory -x https://proxy $URL
 ---
 Same as --capath but used in HTTPS proxy context.
index fb7596c178a0ff8b1fa4181595a1c15cf6ddb701..2152f537d63f77a0f7277b33fc044777a9206b3e 100644 (file)
@@ -3,5 +3,6 @@ Arg: <type>
 Added: 7.52.0
 Help: Client certificate type for HTTPS proxy
 Category: proxy tls
+Example: --proxy-cert-type PEM --proxy-cert file -x https://proxy $URL
 ---
 Same as --cert-type but used in HTTPS proxy context.
index 7df2712f32d16c34234b2b0e7feca183c3286c28..3cf54b73f30adef8a673f7568104f6b7be89495d 100644 (file)
@@ -3,5 +3,6 @@ Arg: <cert[:passwd]>
 Help: Set client certificate for proxy
 Added: 7.52.0
 Category: proxy tls
+Example: --proxy-cert file -x https://proxy $URL
 ---
 Same as --cert but used in HTTPS proxy context.
index 366555673110b6110aae5a1485e64bb50b86890f..b4c358091350502edcbfe1c634ca1fea952b602b 100644 (file)
@@ -3,5 +3,6 @@ Arg: <list>
 Help: SSL ciphers to use for proxy
 Added: 7.52.0
 Category: proxy tls
+Example: --proxy-ciphers ECDHE-ECDSA-AES256-CCM8 -x https://proxy $URL
 ---
 Same as --ciphers but used in HTTPS proxy context.
index 580dc50ce04911d937cab8df193a7cde6c09f780..1ac199965f1d2b43b88bf35588a8329bd7a5a7e6 100644 (file)
@@ -3,5 +3,6 @@ Arg: <file>
 Help: Set a CRL list for proxy
 Added: 7.52.0
 Category: proxy tls
+Example: --proxy-crlfile rejects.txt -x https://proxy $URL
 ---
 Same as --crlfile but used in HTTPS proxy context.
index 52f1fcc67d0917dcd46ed3557df664f54263079e..cc187023683de28f5f582bcc3d44673271a6fbcd 100644 (file)
@@ -2,6 +2,7 @@ Long: proxy-digest
 Help: Use Digest authentication on the proxy
 See-also: proxy proxy-anyauth proxy-basic
 Category: proxy tls
+Example: --proxy-digest --proxy-user user:passwd -x proxy $URL
 ---
 Tells curl to use HTTP Digest authentication when communicating with the given
 proxy. Use --digest for enabling HTTP Digest with a remote host.
index c2b0928f986415dd85b17a6c6c4485aada0b27dd..273a773d948eabe7285b111901b7638f5c6a8562 100644 (file)
@@ -4,6 +4,9 @@ Help: Pass custom header(s) to proxy
 Protocols: HTTP
 Added: 7.37.0
 Category: proxy
+Example: --proxy-header "X-First-Name: Joe" -x http://proxy $URL
+Example: --proxy-header "User-Agent: surprise" -x http://proxy $URL
+Example: --proxy-header "Host:" -x http://proxy $URL
 ---
 Extra header to include in the request when sending HTTP to a proxy. You may
 specify any number of extra headers. This is the equivalent option to --header
index e123f40192f7247381c3c04b0b141c1873df829b..3f4f7c18051c34e0b11022b6f103819874a581c0 100644 (file)
@@ -2,5 +2,6 @@ Long: proxy-insecure
 Help: Do HTTPS proxy connections without verifying the proxy
 Added: 7.52.0
 Category: proxy tls
+Example: --proxy-insecure -x https://proxy $URL
 ---
 Same as --insecure but used in HTTPS proxy context.
index 1906872ef658458d12a7086fd8bb8bf371b503e2..31f47afa4aba63151b8fb0d2821d172176749754 100644 (file)
@@ -3,5 +3,6 @@ Arg: <type>
 Help: Private key file type for proxy
 Added: 7.52.0
 Category: proxy tls
+Example: --proxy-key-type DER --proxy-key here -x https://proxy $URL
 ---
 Same as --key-type but used in HTTPS proxy context.
index 57d469f435cf832d63ac260e0a3e309b307198d4..1b9797307a95de61a7ce539a29e2d339bd7f1d79 100644 (file)
@@ -2,5 +2,6 @@ Long: proxy-key
 Help: Private key for HTTPS proxy
 Arg: <key>
 Category: proxy tls
+Example: --proxy-key here -x https://proxy $URL
 ---
 Same as --key but used in HTTPS proxy context.
index 72f35960e98bd78ace46249e72d0f234ad8292af..5085a7cb3aa023ad202a3ce26ba4b056f62ddb36 100644 (file)
@@ -3,6 +3,7 @@ Help: Use HTTP Negotiate (SPNEGO) authentication on the proxy
 Added: 7.17.1
 See-also: proxy-anyauth proxy-basic
 Category: proxy auth
+Example: --proxy-negotiate --proxy-user user:passwd -x proxy $URL
 ---
 Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
 with the given proxy. Use --negotiate for enabling HTTP Negotiate (SPNEGO)
index cb1ba7b00ee83df52433e11ef987e9c56467e802..074b7df85569305af8be633fdd9c84b6e32f7f13 100644 (file)
@@ -2,6 +2,7 @@ Long: proxy-ntlm
 Help: Use NTLM authentication on the proxy
 See-also: proxy-negotiate proxy-anyauth
 Category: proxy auth
+Example: --proxy-ntlm --proxy-user user:passwd -x http://proxy $URL
 ---
 Tells curl to use HTTP NTLM authentication when communicating with the given
 proxy. Use --ntlm for enabling NTLM with a remote host.
index 627451bbbe1fac64c679b4695b5bf2fc301b06a6..b71468413a8a42714fa3451d352a5c40c4e427a3 100644 (file)
@@ -3,5 +3,6 @@ Arg: <phrase>
 Help: Pass phrase for the private key for HTTPS proxy
 Added: 7.52.0
 Category: proxy tls auth
+Example: --proxy-pass secret --proxy-key here -x https://proxy $URL
 ---
 Same as --pass but used in HTTPS proxy context.
index 2ab79f19e82897609737598f6a3e36137e795404..b7f50a769fdcff6fcc0d106d7d8f1184d2a490f8 100644 (file)
@@ -3,6 +3,8 @@ Arg: <hashes>
 Help: FILE/HASHES public key to verify proxy with
 Protocols: TLS
 Category: proxy tls
+Example: --proxy-pinnedpubkey keyfile $URL
+Example: --proxy-pinnedpubkey 'sha256//ce118b51897f4452dc' $URL
 ---
 Tells curl to use the specified public key file (or hashes) to verify the
 proxy. This can be a path to a file which contains a single public key in PEM
index f78072906e4f3b74f8c67ace90523d2229fac103..fbed175700ac5e13c9b1303696a5a0576a479395 100644 (file)
@@ -3,5 +3,6 @@ Arg: <name>
 Help: SPNEGO proxy service name
 Added: 7.43.0
 Category: proxy tls
+Example: --proxy-service-name "shrubbery" -x proxy $URL
 ---
 This option allows you to change the service name for proxy negotiation.
index 138001b36ba5e7987040ca3f4abdc8768da35eb5..b3e701f05a386648ecc86caba982a6eff4744fb9 100644 (file)
@@ -2,5 +2,6 @@ Long: proxy-ssl-allow-beast
 Help: Allow security flaw for interop for HTTPS proxy
 Added: 7.52.0
 Category: proxy tls
+Example: --proxy-ssl-allow-beast -x https://proxy $URL
 ---
 Same as --ssl-allow-beast but used in HTTPS proxy context.
index 054175457f28a9a7f5bae1cb6819080e0c17eae2..7c071d7eca0f2e226a92fc07237234a404178f4d 100644 (file)
@@ -2,5 +2,6 @@ Long: proxy-ssl-auto-client-cert
 Help: Use auto client certificate for proxy (Schannel)
 Added: 7.77.0
 Category: proxy tls
+Example: --proxy-ssl-auto-client-cert -x https://proxy $URL
 ---
 Same as --ssl-auto-client-cert but used in HTTPS proxy context.
index 9f03f135e16380fcf16f01f3e98365aa971f2c79..62578f7f4eb98329852f6bb60391ea9218b866e6 100644 (file)
@@ -3,6 +3,7 @@ Arg: <ciphersuite list>
 help: TLS 1.3 proxy cipher suites
 Protocols: TLS
 Category: proxy tls
+Example: --proxy-tls13-ciphers TLS_AES_128_GCM_SHA256 -x proxy $URL
 ---
 Specifies which cipher suites to use in the connection to your HTTPS proxy
 when it negotiates TLS 1.3. The list of ciphers suites must specify valid
index 5649a0f5f97510becdf8eab8f16dfbe1e21750d1..c00928ed56454d2d8b7c97c68d090875c65382ae 100644 (file)
@@ -3,5 +3,6 @@ Arg: <type>
 Help: TLS authentication type for HTTPS proxy
 Added: 7.52.0
 Category: proxy tls auth
+Example: --proxy-tlsauthtype SRP -x https://proxy $URL
 ---
 Same as --tlsauthtype but used in HTTPS proxy context.
index 38a33d45d4ca50ea3d1b00054616588b7548c358..89b551d68affcaaaf69cb3d182f2c331e88cf3c3 100644 (file)
@@ -3,5 +3,6 @@ Arg: <string>
 Help: TLS password for HTTPS proxy
 Added: 7.52.0
 Category: proxy tls auth
+Example: --proxy-tlspassword passwd -x https://proxy $URL
 ---
 Same as --tlspassword but used in HTTPS proxy context.
index 587f7f510686722b5b79c07d4eacd5a49aa4cf04..b3c400ed5d5398cacb6fd11c520f41f227808e5a 100644 (file)
@@ -3,5 +3,6 @@ Arg: <name>
 Help: TLS username for HTTPS proxy
 Added: 7.52.0
 Category: proxy tls auth
+Example: --proxy-tlsuser smith -x https://proxy $URL
 ---
 Same as --tlsuser but used in HTTPS proxy context.
index 5003f5f707b2f9d679c4e9db837c524972264266..c54782e8f8a6268b1492d7f6db65ca834597b5bc 100644 (file)
@@ -2,5 +2,6 @@ Long: proxy-tlsv1
 Help: Use TLSv1 for HTTPS proxy
 Added: 7.52.0
 Category: proxy tls auth
+Example: --proxy-tlsv1 -x https://proxy $URL
 ---
 Same as --tlsv1 but used in HTTPS proxy context.
index 82fc5170f4e7dd98bf1cb20c3d7b0ac3a8e7025d..81d29f2ab0efaefb5a0b53eb75416f1be5e4d641 100644 (file)
@@ -3,6 +3,7 @@ Short: U
 Arg: <user:password>
 Help: Proxy user and password
 Category: proxy auth
+Example: --proxy-user name:pwd -x proxy $URL
 ---
 Specify the user name and password to use for proxy authentication.
 
index 0592f13ba529caf0a9b8ec7bf034fa230deb92c9..81d9bc9521cac42f7fd3f47f94ac66944d58304b 100644 (file)
@@ -3,6 +3,7 @@ Short: x
 Arg: [protocol://]host[:port]
 Help: Use this proxy
 Category: proxy
+Example: --proxy http://proxy.example $URL
 ---
 Use the specified proxy.
 
index b8a232bf74c1b16ad37346d08557a1739f67ffbc..f74834567524243c4b9f6f7ac3618ce071880302 100644 (file)
@@ -2,6 +2,7 @@ Long: proxy1.0
 Arg: <host[:port]>
 Help: Use HTTP/1.0 proxy on given port
 Category: proxy
+Example: --proxy1.0 -x http://proxy $URL
 ---
 Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
 assumed at port 1080.
index 94dae992f02cfee3903fd9356d68654b48d4cadb..712c755a87e58a2b480be1fbfb22958f6b92b4e5 100644 (file)
@@ -3,6 +3,7 @@ Short: p
 Help: Operate through an HTTP proxy tunnel (using CONNECT)
 See-also: proxy
 Category: proxy
+Example: --proxytunnel -x http://proxy $URL
 ---
 When an HTTP proxy is used --proxy, this option will make curl tunnel through
 the proxy. The tunnel approach is made with the HTTP proxy CONNECT request and
index 692daf6b0703a3983d26e03bc0a5a72d2fd32114..c1fb5d8ef30e5451920d7374c13dbc318217a2e6 100644 (file)
@@ -3,6 +3,7 @@ Arg: <key>
 Protocols: SFTP SCP
 Help: SSH Public key file name
 Category: sftp scp auth
+Example: --pubkey file.pub sftp://example.com/
 ---
 Public key file name. Allows you to provide your public key in this separate
 file.
index 3adb06f8a8ba03b9e54d984f7185983b5263232a..2707c87dd7f87d944cc22b09066f61ecac6c49e4 100644 (file)
@@ -4,6 +4,7 @@ Short: Q
 Help: Send command(s) to server before transfer
 Protocols: FTP SFTP
 Category: ftp sftp
+Example: --quote "DELE file" ftp://example.com/foo
 ---
 Send an arbitrary command to the remote FTP or SFTP server. Quote commands are
 sent BEFORE the transfer takes place (just after the initial PWD command in an
index c57f52364e549cd187fb334a855c05a18b8c6989..a207c1e1ba773b625fd39c4f19b2d45b02959955 100644 (file)
@@ -2,6 +2,7 @@ Long: random-file
 Arg: <file>
 Help: File for reading random data from
 Category: misc
+Example: --random-file rubbish $URL
 ---
 Specify the path name to file containing what will be considered as random
 data. The data may be used to seed the random engine for SSL connections.  See
index e2d1f62fcb7abc83b078f32a597247a7035a9179..0637f8fc2be43d4ee725188e009c433792311a57 100644 (file)
@@ -4,6 +4,7 @@ Help: Retrieve only the bytes within RANGE
 Arg: <range>
 Protocols: HTTP FTP SFTP FILE
 Category: http ftp sftp file
+Example: --range 22-44 $URL
 ---
 Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
 server or a local FILE. Ranges can be specified in a number of ways.
index 90e777263bd7fe7ed2f95c3e60b515fd7777ad9e..c44d33f5cc5f970b7f79a3d9005314180b06d4b2 100644 (file)
@@ -3,6 +3,7 @@ Help: Do HTTP "raw"; no transfer decoding
 Added: 7.16.2
 Protocols: HTTP
 Category: http
+Example: --raw $URL
 ---
 When used, it disables all internal HTTP decoding of content or transfer
 encodings and instead makes them passed on unaltered, raw.
index 8b2057b9400b6aa0780a38f7a0618943f4d468de..3f6b7c7e12a535f588fe402e3f32c491edd54dc5 100644 (file)
@@ -5,6 +5,9 @@ Protocols: HTTP
 Help: Referrer URL
 See-also: user-agent header
 Category: http
+Example: --referer "https://fake.example" $URL
+Example: --referer "https://fake.example;auto" -L $URL
+Example: --referer ";auto" -L $URL
 ---
 Sends the "Referrer Page" information to the HTTP server. This can also be set
 with the --header flag of course.  When used with --location you can append
index 325dade3f072b8f97fa9b7951da3ebab9722ca2c..6e0b98bd1fc94c0197d3a255d98cc3efffc3ad38 100644 (file)
@@ -3,6 +3,7 @@ Short: J
 Protocols: HTTP
 Help: Use the header-provided filename
 Category: output
+Example: -OJ https://example.com/file
 ---
 This option tells the --remote-name option to use the server-specified
 Content-Disposition filename instead of extracting a filename from the URL.
index 299684c51d93fe6a101af8e14d7c91a63938f58d..e27bd5f48d76123061dd33e5bf78d6ea0d0f7da3 100644 (file)
@@ -2,6 +2,7 @@ Long: remote-name-all
 Help: Use the remote file name for all URLs
 Added: 7.19.0
 Category: output
+Example: --remote-name-all ftp://example.com/file1 ftp://example.com/file2
 ---
 This option changes the default action for all given URLs to be dealt with as
 if --remote-name were used for each one. So if you want to disable that for a
index 184c32e4769e1d26297ca4d5db77a14ab562ff37..68928794b57e18c6a0a33fd7156c3be7842b1466 100644 (file)
@@ -2,6 +2,7 @@ Long: remote-name
 Short: O
 Help: Write output to a file named as the remote file
 Category: important output
+Example: -O https://example.com/filename
 ---
 Write output to a local file named like the remote file we get. (Only the file
 part of the remote file is used, the path is cut off.)
index 96fb4fbe99837b0784771e7696b68c644f846b4e..9c463ae81986da238ca899b384462d9eaf5508d5 100644 (file)
@@ -2,6 +2,7 @@ Long: remote-time
 Short: R
 Help: Set the remote file's time on the local output
 Category: output
+Example: --remote-time -o foo $URL
 ---
 When used, this will make curl attempt to figure out the timestamp of the
 remote file, and if that is available make the local file get that same
index 4422611b134b1c897ea328cbfb3ea11e9616515a..5f9e475514d79fd59e58f2cd7534d8419321028f 100644 (file)
@@ -4,6 +4,7 @@ Help: Specify the target for this request
 Protocols: HTTP
 Added: 7.55.0
 Category: http
+Example: --request-target "*" -X OPTIONS $URL
 ---
 Tells curl to use an alternative "target" (path) instead of using the path as
 provided in the URL. Particularly useful when wanting to issue HTTP requests
index 47c4c8b049afa3e807a336eb163afc6e7636cc4d..0db0bc9f7700a012c1339d560fb698f8c8752af9 100644 (file)
@@ -3,6 +3,8 @@ Short: X
 Arg: <command>
 Help: Specify request command to use
 Category: connection
+Example: -X "DELETE" $URL
+Example: -X NLST ftp://example.com/
 ---
 (HTTP) Specifies a custom request method to use when communicating with the
 HTTP server.  The specified request method will be used instead of the method
index ff10f28d969b6c85ea9297fdd041c83ed9287439..6464c42fb511acca6884de8f18ecd876cd02724d 100644 (file)
@@ -3,6 +3,7 @@ Arg: <[+]host:port:addr[,addr]...>
 Help: Resolve the host+port to this address
 Added: 7.21.3
 Category: connection
+Example: --resolve example.com:443:127.0.0.1 $URL
 ---
 Provide a custom address for a specific host and port pair. Using this, you
 can make the curl requests(s) use a specified address and prevent the
index 5ad1da0dec31a8ba14a2209fe2b5b05a5c355e21..5cab5ddaafa1e3b857362324e2a8058ca9ce2e39 100644 (file)
@@ -2,6 +2,7 @@ Long: retry-all-errors
 Help: Retry all errors (use with --retry)
 Added: 7.71.0
 Category: curl
+Example: --retry-all-errors $URL
 ---
 Retry on any error. This option is used together with --retry.
 
@@ -11,13 +12,14 @@ receiving duplicate data. Do not use with redirected input or output. You'd be
 much better off handling your unique problems in shell script. Please read the
 example below.
 
-Warning: For server compatibility curl attempts to retry failed flaky transfers
-as close as possible to how they were started, but this is not possible with
-redirected input or output. For example, before retrying it removes output data
-from a failed partial transfer that was written to an output file. However this
-is not true of data redirected to a | pipe or > file, which are not reset. We
-strongly suggest don't parse or record output via redirect in combination with
-this option, since you may receive duplicate data.
+**WARNING**: For server compatibility curl attempts to retry failed flaky
+transfers as close as possible to how they were started, but this is not
+possible with redirected input or output. For example, before retrying it
+removes output data from a failed partial transfer that was written to an
+output file. However this is not true of data redirected to a | pipe or >
+file, which are not reset. We strongly suggest don't parse or record output
+via redirect in combination with this option, since you may receive duplicate
+data.
 
 By default curl will not error on an HTTP response code that indicates an HTTP
 error, if the transfer was successful. For example, if a server replies 404
index be34f973d5ca13e6cecbec94ad67ce9f31377b87..ad079e09626614b92a934b98570d9976a2b65682 100644 (file)
@@ -2,6 +2,7 @@ Long: retry-connrefused
 Help: Retry on connection refused (use with --retry)
 Added: 7.52.0
 Category: curl
+Example: --retry-connrefused --retry $URL
 ---
 In addition to the other conditions, consider ECONNREFUSED as a transient
 error too for --retry. This option is used together with --retry.
index 5645c0e6a56545dbcd126834e08f9906021c1cd6..28391290444676f12f491508db55e747bc3bdf61 100644 (file)
@@ -3,6 +3,7 @@ Arg: <seconds>
 Help: Wait time between retries
 Added: 7.12.3
 Category: curl
+Example: --retry-delay 5 --retry $URL
 ---
 Make curl sleep this amount of time before each retry when a transfer has
 failed with a transient error (it changes the default backoff time algorithm
index 9d6faf3041fff58ab8f3613e45cfbc5b9770e91f..acccff5d415035599e5096476930c3eb92e371ff 100644 (file)
@@ -3,6 +3,7 @@ Arg: <seconds>
 Help: Retry only within this period
 Added: 7.12.3
 Category: curl
+Example: --retry-max-time 30 --retry 10 $URL
 ---
 The retry timer is reset before the first transfer attempt. Retries will be
 done as usual (see --retry) as long as the timer hasn't reached this given
index bff0ef22696f7d12e38ffa13780441bc9b7fccd9..6238383fe36fb595b5fd57fbd32f593175e7feae 100644 (file)
@@ -3,6 +3,7 @@ Arg: <num>
 Added: 7.12.3
 Help: Retry request if transient problems occur
 Category: curl
+Example: --retry 7 $URL
 ---
 If a transient error is returned when curl tries to perform a transfer, it
 will retry this number of times before giving up. Setting the number to 0
index e802c80a16dfbc9aa7f5be4d332abe119a5e1a26..9065bd5ecb22ccc1aface64fa6b0b16fb4d24420 100644 (file)
@@ -3,6 +3,7 @@ Arg: <identity>
 Help: Identity for SASL PLAIN authentication
 Added: 7.66.0
 Category: auth
+Example: --sasl-authzid zid imap://example.com/
 ---
 Use this authorisation identity (authzid), during SASL PLAIN authentication,
 in addition to the authentication identity (authcid) as specified by --user.
index 0041c3b4e7797a3c64dc4b3372b1b82a6ba8640b..5004306a4addde20178e22189890e4e54559e18d 100644 (file)
@@ -2,5 +2,6 @@ Long: sasl-ir
 Help: Enable initial response in SASL authentication
 Added: 7.31.0
 Category: auth
+Example: --sasl-ir imap://example.com/
 ---
 Enable initial response in SASL authentication.
index c64496b85856e9edde8d1e078f23f83cfdd98ba9..3a5559bc865786c910dacec9234b1dc40c1ccf40 100644 (file)
@@ -3,6 +3,7 @@ Help: SPNEGO service name
 Arg: <name>
 Added: 7.43.0
 Category: misc
+Example: --service-name sockd/server $URL
 ---
 This option allows you to change the service name for SPNEGO.
 
index 258949a500b555674e1b133c4a22be7545984ff5..e8b2177129e7c3d1e344bcfad61a61a27685d720 100644 (file)
@@ -3,6 +3,7 @@ Short: S
 Help: Show error even when -s is used
 See-also: no-progress-meter
 Category: curl
+Example: --show-error --silent $URL
 ---
 When used with --silent, it makes curl show an error message if it fails.
 
index 58a522335efc62396310463a349d8e25fe88fe4f..7122c542eb2bf0237e80f5cea5c835a64df4e0ff 100644 (file)
@@ -3,6 +3,7 @@ Short: s
 Help: Silent mode
 See-also: verbose stderr no-progress-meter
 Category: important verbose
+Example: -s $URL
 ---
 Silent or quiet mode. Don't show progress meter or error messages.  Makes Curl
 mute. It will still output the data you ask for, potentially even to the
index 3cfb2540c00d596269748d27ce073afd49124027..1cae1e1fcec0379753abeae08b6dbb00be84ba06 100644 (file)
@@ -3,6 +3,7 @@ Arg: <host[:port]>
 Help: SOCKS4 proxy on given host + port
 Added: 7.15.2
 Category: proxy
+Example: --socks4 hostname:4096 $URL
 ---
 Use the specified SOCKS4 proxy. If the port number is not specified, it is
 assumed at port 1080. Using this socket type make curl resolve the host name
index d820566a1a862632c25bf621aecbf47ea938a13d..8edefdd1b626aa59fa58367168d6fe68a6e66839 100644 (file)
@@ -3,6 +3,7 @@ Arg: <host[:port]>
 Help: SOCKS4a proxy on given host + port
 Added: 7.18.0
 Category: proxy
+Example: --socks4a hostname:4096 $URL
 ---
 Use the specified SOCKS4a proxy. If the port number is not specified, it is
 assumed at port 1080. This asks the proxy to resolve the host name.
index 52d1e66194e77199e42833a9df645a9000fc32c5..f32e0bf3ea4e114d42821e4dbada1c998e1192f9 100644 (file)
@@ -2,6 +2,7 @@ Long: socks5-basic
 Help: Enable username/password auth for SOCKS5 proxies
 Added: 7.55.0
 Category: proxy auth
+Example: --socks5-basic --socks5 hostname:4096 $URL
 ---
 Tells curl to use username/password authentication when connecting to a SOCKS5
 proxy.  The username/password authentication is enabled by default.  Use
index b538f33f362c43e8bed69bf00cad3fa7c03a620a..73cac7a2265bd17483d9ddd13b3731207f352e03 100644 (file)
@@ -2,6 +2,7 @@ Long: socks5-gssapi-nec
 Help: Compatibility with NEC SOCKS5 server
 Added: 7.19.4
 Category: proxy auth
+Example: --socks5-gssapi-nec --socks5 hostname:4096 $URL
 ---
 As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
 says in section 4.3/4.4 it should be protected, but the NEC reference
index e61d0f5ab31f0ffd51f49bfde7576b57bf4ce0d8..451be8e2d1a0b55709f30e90616e03bfbcbd80d7 100644 (file)
@@ -3,6 +3,7 @@ Arg: <name>
 Help: SOCKS5 proxy service name for GSS-API
 Added: 7.19.4
 Category: proxy auth
+Example: --socks5-gssapi-service sockd --socks5 hostname:4096 $URL
 ---
 The default service name for a socks server is rcmd/server-fqdn. This option
 allows you to change it.
index 72ae7aeb2b7e116f3b09b50158b3050fe501f77c..2ce806955b42aeee941e0ba31151acc5308763ea 100644 (file)
@@ -2,6 +2,7 @@ Long: socks5-gssapi
 Help: Enable GSS-API auth for SOCKS5 proxies
 Added: 7.55.0
 Category: proxy auth
+Example: --socks5-gssapi --socks5 hostname:4096 $URL
 ---
 Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy.
 The GSS-API authentication is enabled by default (if curl is compiled with
index 247d7660e7f950e7a9b6d26d25243d86105a9229..729a7bf85902754d7080fe42d46f02d777e3df90 100644 (file)
@@ -3,6 +3,7 @@ Arg: <host[:port]>
 Help: SOCKS5 proxy, pass host name to proxy
 Added: 7.18.0
 Category: proxy
+Example: --socks5-hostname proxy.example:7000 $URL
 ---
 Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
 the port number is not specified, it is assumed at port 1080.
index bbe92f0a10431f1c50e27a825e2516e74bf5c6a6..99c740f885e54405a723bbe1471bd188571458f2 100644 (file)
@@ -3,6 +3,7 @@ Arg: <host[:port]>
 Help: SOCKS5 proxy on given host + port
 Added: 7.18.0
 Category: proxy
+Example: --socks5 proxy.example:7000 $URL
 ---
 Use the specified SOCKS5 proxy - but resolve the host name locally. If the
 port number is not specified, it is assumed at port 1080.
index 3f9ad3a46e6f4eb430ef0f619a664dc0f603763e..7bf8d5fb1b86b0bfa729895cb601566af186274d 100644 (file)
@@ -3,6 +3,7 @@ Short: Y
 Arg: <speed>
 Help: Stop transfers slower than this
 Category: connection
+Example: --speed-limit 300 --speed-time 10 $URL
 ---
 If a download is slower than this given speed (in bytes per second) for
 speed-time seconds it gets aborted. speed-time is set with --speed-time and is
index 81acabec46a0b95c0b3803f3d38bb9668fbad9bf..6095214564ea7c2a23a99ddab9d36c6b2ea3e76a 100644 (file)
@@ -3,6 +3,7 @@ Short: y
 Arg: <seconds>
 Help: Trigger 'speed-limit' abort after this time
 Category: connection
+Example: --speed-limit 300 --speed-time 10 $URL
 ---
 If a download is slower than speed-limit bytes per second during a speed-time
 period, the download gets aborted. If speed-time is used, the default
index f18fe74704878ad73e108b66279e8d6fb51c8978..f54cf6416fbec3e46d86e57410aaf0a62fa81d9c 100644 (file)
@@ -2,9 +2,12 @@ Long: ssl-allow-beast
 Help: Allow security flaw to improve interop
 Added: 7.25.0
 Category: tls
+Example: --ssl-allow-beast $URL
 ---
 This option tells curl to not work around a security flaw in the SSL3 and
 TLS1.0 protocols known as BEAST.  If this option isn't used, the SSL layer may
 use workarounds known to cause interoperability problems with some older SSL
-implementations. WARNING: this option loosens the SSL security, and by using
-this flag you ask for exactly that.
+implementations.
+
+**WARNING**: this option loosens the SSL security, and by using this flag you
+ask for exactly that.
index 16108aef13a47dbd52b89f5ef0104d6b9ef8a82b..7581bdff688c18ca02e4bbf099ad3d9235abef15 100644 (file)
@@ -3,6 +3,7 @@ Help: Use auto client certificate (Schannel)
 Added: 7.77.0
 See-also: proxy-ssl-auto-client-cert
 Category: tls
+Example: --ssl-auto-client-cert $URL
 ---
 Tell libcurl to automatically locate and use a client certificate for
 authentication, when requested by the server. This option is only supported
index 3b1614243e24c4a72b09378a6afce9a681ed4d5d..dde77aa113c0a75c4f6584325bcbe331957ecd94 100644 (file)
@@ -2,6 +2,7 @@ Long: ssl-no-revoke
 Help: Disable cert revocation checks (Schannel)
 Added: 7.44.0
 Category: tls
+Example: --ssl-no-revoke $URL
 ---
 (Schannel) This option tells curl to disable certificate revocation checks.
 WARNING: this option loosens the SSL security, and by using this flag you ask
index 2e573e39d1220a4ddfe2f2d53889325a56468516..489be00d97c7f2dc6073be7ff489ec86b4d5410c 100644 (file)
@@ -3,6 +3,7 @@ Help: Require SSL/TLS
 Protocols: FTP IMAP POP3 SMTP
 Added: 7.20.0
 Category: tls
+Example: --ssl-reqd ftp://example.com
 ---
 Require SSL/TLS for the connection.  Terminates the connection if the server
 doesn't support SSL/TLS.
index af22da46115dac3652a49f8d2446089486d2213c..2db32192ee363559b0910526b7bff86a746950c3 100644 (file)
@@ -2,6 +2,7 @@ Long: ssl-revoke-best-effort
 Help: Ignore missing/offline cert CRL dist points
 Added: 7.70.0
 Category: tls
+Example: --ssl-revoke-best-effort $URL
 ---
 (Schannel) This option tells curl to ignore certificate revocation checks when
 they failed due to missing/offline distribution points for the revocation check
index 39616bc2abb8923ebd5e8db6f78cbe555f0f4fbd..bc339faed30581d1e29a96e22bfc67d31e06ce55 100644 (file)
@@ -3,6 +3,7 @@ Help: Try SSL/TLS
 Protocols: FTP IMAP POP3 SMTP
 Added: 7.20.0
 Category: tls
+Example: --ssl pop3://example.com/
 ---
 Try to use SSL/TLS for the connection.  Reverts to a non-secure connection if
 the server doesn't support SSL/TLS.  See also --ftp-ssl-control and --ssl-reqd
index f9ee99d0d06c61e056cc04ed673f93f4211d039c..d96a6cc8d8592a57190d38f936b5a017429710df 100644 (file)
@@ -8,6 +8,8 @@ Requires: TLS
 See-also: http1.1 http2
 Help: Use SSLv2
 Category: tls
+Example: --sslv2 $URL
 ---
-This option previously asked curl to use SSLv2, but starting in curl 7.77.0 this
-instruction is ignored. SSLv2 is widely considered insecure (see RFC 6176).
+This option previously asked curl to use SSLv2, but starting in curl 7.77.0
+this instruction is ignored. SSLv2 is widely considered insecure (see RFC
+6176).
index e8b2c35e874e4d17b29e4bf715776db136f35d5f..3ee483d2aecb0f785a91c18f305a1fc3942cd0a4 100644 (file)
@@ -8,6 +8,7 @@ Requires: TLS
 See-also: http1.1 http2
 Help: Use SSLv3
 Category: tls
+Example: --sslv3 $URL
 ---
 This option previously asked curl to use SSLv3, but starting in curl 7.77.0
 this instruction is ignored. SSLv3 is widely considered insecure (see RFC
index 737df6393a52ad442638a0e6c70a269306060a61..c0f0efa38bbb67073901dd748f4c5dc8e361ae4d 100644 (file)
@@ -3,6 +3,7 @@ Arg: <file>
 Help: Where to redirect stderr
 See-also: verbose silent
 Category: verbose
+Example: --stderr output.txt $URL
 ---
 Redirect all writes to stderr to the specified file instead. If the file name
 is a plain '-', it is instead written to stdout.
index 91d36eca7a8242f730c0f19c90341e93e161bd44..bf636019a63b04f15780329732b0fd1385fe9067 100644 (file)
@@ -2,6 +2,7 @@ Long: styled-output
 Help: Enable styled output for HTTP headers
 Added: 7.61.0
 Category: verbose
+Example: --styled-output -I $URL
 ---
 Enables the automatic use of bold font styles when writing HTTP headers to the
 terminal. Use --no-styled-output to switch them off.
index b4e2a17db12d5ebb7ecec2372b94b40dfca85c0b..71078e8877dbddc9fc3a41896114fd85ce29a73c 100644 (file)
@@ -2,6 +2,7 @@ Long: suppress-connect-headers
 Help: Suppress proxy CONNECT response headers
 See-also: dump-header include proxytunnel
 Category: proxy
+Example: --suppress-connect-headers --include -x proxy $URL
 ---
 When --proxytunnel is used and a CONNECT request is made don't output proxy
 CONNECT response headers. This option is meant to be used with --dump-header or
index faef499f3e5ad7132c00f8219e7367793f72a65a..e7e9d2e9af488e374cd16abce070f171877dab75 100644 (file)
@@ -2,5 +2,6 @@ Long: tcp-fastopen
 Added: 7.49.0
 Help: Use TCP Fast Open
 Category: connection
+Example: --tcp-fastopen $URL
 ---
 Enable use of TCP Fast Open (RFC7413).
index 90483d2e404aeb18fd681e57593450602e3963c0..97cd30aa0e7e9547a7fc69af906baa7de5ecf929 100644 (file)
@@ -2,6 +2,7 @@ Long: tcp-nodelay
 Help: Use the TCP_NODELAY option
 Added: 7.11.2
 Category: connection
+Example: --tcp-nodelay $URL
 ---
 Turn on the TCP_NODELAY option. See the *curl_easy_setopt(3)* man page for
 details about this option.
index 789de3ea1f4d8184fdb1d26d841fdf0f1ef13eda..3475cb596c753369104beb73ebdf46395badca72 100644 (file)
@@ -3,6 +3,7 @@ Short: t
 Arg: <opt=val>
 Help: Set telnet option
 Category: telnet
+Example: -t TTYPE=vt100 telnet://example.com/
 ---
 Pass options to the telnet protocol. Supported options are:
 
index 6e67ed2e11f06e546161ecaa721229503a0d0c7c..3b19e5cf786c52775691ab824be9960829b3c9b9 100644 (file)
@@ -4,6 +4,7 @@ Help: Set TFTP BLKSIZE option
 Protocols: TFTP
 Added: 7.20.0
 Category: tftp
+Example: --tftp-blksize 1024 tftp://example.com/file
 ---
 Set TFTP BLKSIZE option (must be >512). This is the block size that curl will
 try to use when transferring data to or from a TFTP server. By default 512
index 023327301fe8ade4eaf3fe3d31497c2e455fc426..9ff334b86877a6d2ca0a453414843f83fdef87b4 100644 (file)
@@ -3,6 +3,7 @@ Help: Do not send any TFTP options
 Protocols: TFTP
 Added: 7.48.0
 Category: tftp
+Example: --tftp-no-options tftp://192.168.0.1/
 ---
 Tells curl not to send TFTP options requests.
 
index 0b56c6ee39498fb4870dbd7996152a33ef3f73bf..f82f497fc0d16b48e3b80527c5551093ad30dc5f 100644 (file)
@@ -4,6 +4,9 @@ Arg: <time>
 Help: Transfer based on a time condition
 Protocols: HTTP FTP
 Category: http ftp
+Example: -z "Wed 01 Sep 2021 12:18:00" $URL
+Example: -z "-Wed 01 Sep 2021 12:18:00" $URL
+Example: -z file $URL
 ---
 Request a file that has been modified later than the given time and date, or
 one that has been modified before that time. The <date expression> can be all
index 07eb65465de7542324a58679dda9e1d2d25c232a..54431ac38154891a1a1151157ad10011ca891501 100644 (file)
@@ -7,6 +7,8 @@ Requires: TLS
 See-also: tlsv1.0 tlsv1.1 tlsv1.2 tlsv1.3
 Help: Set maximum allowed TLS version
 Category: tls
+Example: --tls-max 1.2 $URL
+Example: --tls-max 1.3 --tlsv1.2 $URL
 ---
 VERSION defines maximum supported TLS version. The minimum acceptable version
 is set by tlsv1.0, tlsv1.1, tlsv1.2 or tlsv1.3.
index 0df1695b488dacc8114093406fb219c2c8209a74..daf1c93ab14443b647e5b1fbf1c51c4de396b2fb 100644 (file)
@@ -3,6 +3,7 @@ Arg: <ciphersuite list>
 help: TLS 1.3 cipher suites to use
 Protocols: TLS
 Category: tls
+Example: --tls13-ciphers TLS_AES_128_GCM_SHA256 $URL
 ---
 Specifies which cipher suites to use in the connection if it negotiates TLS
 1.3. The list of ciphers suites must specify valid ciphers. Read up on TLS 1.3
index 5b283cf9bdf06495befdcb09a9ff7bdbc9b764b1..57b6ab8ad07075d44b9e9a291d47c6042ff9f665 100644 (file)
@@ -3,6 +3,7 @@ Arg: <type>
 Help: TLS authentication type
 Added: 7.21.4
 Category: tls auth
+Example: --tlsauthtype SRP $URL
 ---
 Set TLS authentication type. Currently, the only supported option is "SRP",
 for TLS-SRP (RFC 5054). If --tlsuser and --tlspassword are specified but
index e7e37805c0fb7a9fec06cfb4f72f860a4802fa99..80cf065e9110ac9ac1495ae3ed62b2e9c2e2d382 100644 (file)
@@ -3,6 +3,7 @@ Arg: <string>
 Help: TLS password
 Added: 7.21.4
 Category: tls auth
+Example: --tlspassword pwd --tlsuser user $URL
 ---
 Set password for use with the TLS authentication method specified with
 --tlsauthtype. Requires that --tlsuser also be set.
index ada15260862e3e0208d75379fed89850dd589989..2cfcd951df6f0ba0babddeab18252474eeb7febe 100644 (file)
@@ -3,6 +3,7 @@ Arg: <name>
 Help: TLS user name
 Added: 7.21.4
 Category: tls auth
+Example: --tlspassword pwd --tlsuser user $URL
 ---
 Set username for use with the TLS authentication method specified with
 --tlsauthtype. Requires that --tlspassword also is set.
index 4f0176f31cbd53338d9d53fa3d041e6662f07d55..5fc18dcbeb01e1751981f9fa89519b770b1c2994 100644 (file)
@@ -3,6 +3,7 @@ Help: Use TLSv1.0 or greater
 Protocols: TLS
 Added: 7.34.0
 Category: tls
+Example: --tlsv1.0 $URL
 ---
 Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
 
index b3649f7f44d9ec0a8dbb0d67c2a1377aa75a6571..6d169bf30a1d250fb4bd1675891e3636cd8263aa 100644 (file)
@@ -3,6 +3,7 @@ Help: Use TLSv1.1 or greater
 Protocols: TLS
 Added: 7.34.0
 Category: tls
+Example: --tlsv1.1 $URL
 ---
 Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server.
 
index dffbccb9d526bd475d9a90ccf18e45f5544fb9d5..5df843f7c5a2808f4b5d8d44788d2d84ab4aab44 100644 (file)
@@ -3,6 +3,7 @@ Help: Use TLSv1.2 or greater
 Protocols: TLS
 Added: 7.34.0
 Category: tls
+Example: --tlsv1.2 $URL
 ---
 Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server.
 
index 37d953552e9720cab71796e364922f18d2e6ae4b..cc9a53bcd200233b25185eb0b6165cc09f384507 100644 (file)
@@ -3,6 +3,7 @@ Help: Use TLSv1.3 or greater
 Protocols: TLS
 Added: 7.52.0
 Category: tls
+Example: --tlsv1.3 $URL
 ---
 Forces curl to use TLS version 1.3 or later when connecting to a remote TLS
 server.
index d4c0c51604cb5dfa6f8579441a6f56684d3961bd..b881c24fc7a6f8efefb9777971b01d15e15ae928 100644 (file)
@@ -8,6 +8,7 @@ Requires: TLS
 See-also: http1.1 http2
 Help: Use TLSv1.0 or greater
 Category: tls
+Example: --tlsv1 $URL
 ---
 Tells curl to use at least TLS version 1.x when negotiating with a remote TLS
 server. That means TLS version 1.0 or higher
index ce1d003257871f7bee89337c61ff465d827b1c64..7fdf9e0980dd21a9eae9fd9f292e229cd3f688b5 100644 (file)
@@ -3,6 +3,7 @@ Added: 7.21.6
 Help: Request compressed transfer encoding
 Protocols: HTTP
 Category: http
+Example: --tr-encoding $URL
 ---
 Request a compressed Transfer-Encoding response using one of the algorithms
 curl supports, and uncompress the data while receiving it.
index 461ea6fe5de7d284341c471db5a6f58d4dafe6ee..89fe588144b6bf7c30114faa3e2ee183c93d7c90 100644 (file)
@@ -3,6 +3,7 @@ Arg: <file>
 Help: Like --trace, but without hex output
 Mutexed: trace verbose
 Category: verbose
+Example: --trace-ascii log.txt $URL
 ---
 Enables a full trace dump of all incoming and outgoing data, including
 descriptive information, to the given output file. Use "-" as filename to have
index 81e28e3cec10957a324f8143b506c08e6d45ba29..083270dc66db51114b8fd05517584c8bf6ef1547 100644 (file)
@@ -2,6 +2,7 @@ Long: trace-time
 Help: Add time stamps to trace/verbose output
 Added: 7.14.0
 Category: verbose
+Example: --trace-time --trace-ascii output $URL
 ---
 Prepends a time stamp to each trace or verbose line that curl displays.
 
index 5788f9965979e7e16f2bdcce9248b01ecc0d02ae..3e7154503ced8b1ffd636c79967ab902fe3a2796 100644 (file)
@@ -3,6 +3,7 @@ Arg: <file>
 Help: Write a debug trace to FILE
 Mutexed: verbose trace-ascii
 Category: verbose
+Example: --trace log.txt $URL
 ---
 Enables a full trace dump of all incoming and outgoing data, including
 descriptive information, to the given output file. Use "-" as filename to have
index e4ea91d01512d1cc294ffa613183a1d597630730..c526ca6bcd24595f1b4df7c205e76a925b842197 100644 (file)
@@ -4,5 +4,6 @@ Help: Connect through this Unix domain socket
 Added: 7.40.0
 Protocols: HTTP
 Category: connection
+Example: --unix-socket socket-path $URL
 ---
 Connect through this Unix domain socket, instead of using the network.
index 63584b7970aa17bcfc54508e4772456a380897a9..5cc56285bc775c7c466aef48e418b54274f2f2f1 100644 (file)
@@ -3,6 +3,9 @@ Short: T
 Arg: <file>
 Help: Transfer local FILE to destination
 Category: important upload
+Example: -T file $URL
+Example: -T "img[1-1000].png" ftp://ftp.example.com/
+Example: --upload-file "{file1,file2}" $URL
 ---
 This transfers the specified local file to the remote URL. If there is no file
 part in the specified URL, curl will append the local file name. NOTE that you
@@ -12,21 +15,15 @@ file name to use. That will most likely cause the upload operation to fail. If
 this is used on an HTTP(S) server, the PUT command will be used.
 
 Use the file name "-" (a single dash) to use stdin instead of a given file.
-Alternately, the file name "." (a single period) may be specified instead
-of "-" to use stdin in non-blocking mode to allow reading server output
-while stdin is being uploaded.
+Alternately, the file name "." (a single period) may be specified instead of
+"-" to use stdin in non-blocking mode to allow reading server output while
+stdin is being uploaded.
 
 You can specify one --upload-file for each URL on the command line. Each
 --upload-file + URL pair specifies what to upload and to where. curl also
 supports "globbing" of the --upload-file argument, meaning that you can upload
 multiple files to a single URL by using the same URL globbing style supported
-in the URL, like this:
-
- curl --upload-file "{file1,file2}" http://www.example.com
-
-or even
-
- curl -T "img[1-1000].png" ftp://ftp.example.com/upload/
+in the URL.
 
 When uploading to an SMTP server: the uploaded data is assumed to be RFC 5322
 formatted. It has to feature the necessary set of headers and mail body
index 30f0bf72eb5f7b51bdbf36d046b061eecc286e4b..ed1598a3c189fdecd33409307f00f9ba58d21eb1 100644 (file)
@@ -2,6 +2,7 @@ Long: url
 Arg: <url>
 Help: URL to work with
 Category: curl
+Example: --url $URL
 ---
 Specify a URL to fetch. This option is mostly handy when you want to specify
 URL(s) in a config file.
@@ -15,5 +16,5 @@ setting a default protocol, see --proto-default for details.
 This option may be used any number of times. To control where this URL is
 written, use the --output or the --remote-name options.
 
-Warning: On Windows, particular file:// accesses can be converted to network
-accesses by the operating system. Beware!
+**WARNING**: On Windows, particular file:// accesses can be converted to
+network accesses by the operating system. Beware!
index 3a5a6a4f811b9e2f107692362ba794b05e81f648..79554c7dc0b4417ef386f251456ff95188fdc4cd 100644 (file)
@@ -3,6 +3,7 @@ Long: use-ascii
 Help: Use ASCII/text transfer
 Protocols: FTP LDAP
 Category: misc
+Example: -B ftp://example.com/README
 ---
 Enable ASCII transfer. For FTP, this can also be enforced by using a URL that
 ends with ";type=A". This option causes data sent to stdout to be in text mode
index bcc3ddb65f012cc76e532ec59ae89b6925d409a4..a322d14890fb6439bd2932a9abee59df9d399576 100644 (file)
@@ -4,6 +4,7 @@ Arg: <name>
 Help: Send User-Agent <name> to server
 Protocols: HTTP
 Category: important http
+Example: -A "Agent 007" $URL
 ---
 Specify the User-Agent string to send to the HTTP server. To encode blanks in
 the string, surround the string with single quote marks. This header can also
index b588700c0b826a2fc89a2f91db31ad12dda1495b..6ab3c64395d10ffa54d36dedf46a3363d144f2e0 100644 (file)
@@ -3,6 +3,7 @@ Short: u
 Arg: <user:password>
 Help: Server user and password
 Category: important auth
+Example: -u user:secret $URL
 ---
 Specify the user name and password to use for server authentication. Overrides
 --netrc and --netrc-optional.
index 497eeb6d4b6e67a2d7884469bca20dcb2b28bf84..f040d75e2dbaa0eda19e81a9732067e812090ab9 100644 (file)
@@ -4,6 +4,7 @@ Mutexed: trace trace-ascii
 Help: Make the operation more talkative
 See-also: include
 Category: important verbose
+Example: --verbose $URL
 ---
 Makes curl verbose during the operation. Useful for debugging and seeing
 what's going on "under the hood". A line starting with '>' means "header data"
index a257ebd9f97d1f4cae128cc0e83c6fb1ec9c8a8a..f3c5899be337b98aa4457f3fa29692b824ae3e46 100644 (file)
@@ -2,6 +2,7 @@ Long: version
 Short: V
 Help: Show version number and quit
 Category: important curl
+Example: --version
 ---
 Displays information about curl and the libcurl version it uses.
 
index df50c318cc9559d3a5f9b762ec2f3c74ea2e3e24..6c74ddcdc4df8b747cb63c46c6959829e99ebfc6 100644 (file)
@@ -3,6 +3,7 @@ Short: w
 Arg: <format>
 Help: Use output FORMAT after completion
 Category: verbose
+Example: -w '%{http_code}\\n' $URL
 ---
 Make curl display information on stdout after a completed transfer. The format
 is a string that may contain plain text mixed with any number of
index 4b64c6cbfc5266d0e3602e7c3900319dabb56826..8011b79b0d3c1a179e23a705dad64795112e778d 100644 (file)
@@ -1,6 +1,7 @@
 Long: xattr
 Help: Store metadata in extended file attributes
 Category: misc
+Example: --xattr -o storage $URL
 ---
 When saving output to a file, this option tells curl to store certain file
 metadata in extended file attributes. Currently, the URL is stored in the
index b5e37aa9af772869999988a545f69b1b242b51d5..cc23b12e23b4d6f26cf33c3bd970ba75f087e8b4 100644 (file)
@@ -169,7 +169,7 @@ static const struct helptxt helptext[] = {
   {"-K, --config <file>",
    "Read config from a file",
    CURLHELP_CURL},
-  {"    --connect-timeout <seconds>",
+  {"    --connect-timeout <fractional seconds>",
    "Maximum time allowed for connection",
    CURLHELP_CONNECTION},
   {"    --connect-to <HOST1:PORT1:HOST2:PORT2>",
@@ -194,7 +194,7 @@ static const struct helptxt helptext[] = {
    "Convert LF to CRLF in upload",
    CURLHELP_FTP | CURLHELP_SMTP},
   {"    --crlfile <file>",
-   "Get a CRL list in PEM format from the given file",
+   "Use this CRL list",
    CURLHELP_TLS},
   {"    --curves <algorithm list>",
    "(EC) TLS key exchange algorithm(s) to request",
@@ -442,7 +442,7 @@ static const struct helptxt helptext[] = {
   {"    --max-redirs <num>",
    "Maximum number of redirects allowed",
    CURLHELP_HTTP},
-  {"-m, --max-time <seconds>",
+  {"-m, --max-time <fractional seconds>",
    "Maximum time allowed for the transfer",
    CURLHELP_CONNECTION},
   {"    --metalink",