Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.\" **************************************************************************
.\" * _ _ ____ _
.\" * Project ___| | | | _ \| |
.\" * / __| | | | |_) | |
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 \- 2022, Daniel Stenberg, , et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" * SPDX-License-Identifier: curl
.\" *
.\" **************************************************************************
.\"
.\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
.\"
.TH curl 1 "December 19 2022" "curl 7.87.0" "curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
.B curl [options / URLs]
.SH DESCRIPTION
\fBcurl\fP is a tool for transferring data from or to a server. It supports these
protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS,
LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP,
SMTPS, TELNET, TFTP, WS and WSS. The command is designed to work without user
interaction.
curl offers a busload of useful tricks like proxy support, user
authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
resume and more. As you will see below, the number of features will make your
head spin.
curl is powered by libcurl for all transfer-related features. See
\fIlibcurl(3)\fP for details.
.SH URL
The URL syntax is protocol-dependent. You find a detailed description in
RFC 3986.
You can specify multiple URLs or parts of URLs by writing part sets within
braces and quoting the URL as in:
.nf
\(dqhttp://site.{one,two,three}.com"
.fi
or you can get sequences of alphanumeric series by using [] as in:
.nf
\(dqftp://ftp.example.com/file[1-100].txt"
.fi
.nf
\(dqftp://ftp.example.com/file[001-100].txt" (with leading zeros)
.fi
.nf
\(dqftp://ftp.example.com/file[a-z].txt"
.fi
Nested sequences are not supported, but you can use several ones next to each
other:
.nf
\(dqhttp://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html"
.fi
You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order. You can specify command line
options and URLs mixed and in any order on the command line.
You can specify a step counter for the ranges to get every Nth number or
letter:
.nf
\(dqhttp://example.com/file[1-100:10].txt"
.fi
.nf
\(dqhttp://example.com/file[a-z:2].txt"
.fi
When using [] or {} sequences when invoked from a command line prompt, you
probably have to put the full URL within double quotes to avoid the shell from
interfering with it. This also goes for other characters treated special, like
for example '&', '?' and '*'.
Provide the IPv6 zone index in the URL with an escaped percentage sign and the
interface name. Like in
.nf
\(dqhttp://[fe80::3%25eth0]/"
.fi
If you specify URL without protocol:// prefix, curl will attempt to guess what
protocol you might want. It will then default to HTTP but try other protocols
based on often-used host name prefixes. For example, for host names starting
with "ftp." curl will assume you want to speak FTP.
curl will do its best to use what you pass to it as a URL. It is not trying to
validate it as a syntactically correct URL by any means but is fairly liberal
with what it accepts.
curl will attempt to re-use connections for multiple file transfers, so that
getting many files from the same server will not do multiple connects /
handshakes. This improves speed. Of course this is only done on files
specified on a single command line and cannot be used between separate curl
invocations.
.SH OUTPUT
If not told otherwise, curl writes the received data to stdout. It can be
instructed to instead save that data into a local file, using the \fI\-o, \-\-output\fP or
\fI\-O, \-\-remote-name\fP options. If curl is given multiple URLs to transfer on the
command line, it similarly needs multiple options for where to save them.
curl does not parse or otherwise "understand" the content it gets or writes as
output. It does no encoding or decoding, unless explicitly asked to with
dedicated command line options.
.SH PROTOCOLS
curl supports numerous protocols, or put in URL terms: schemes. Your
particular build may not support them all.
.IP DICT
Lets you lookup words using online dictionaries.
.IP FILE
Read or write local files. curl does not support accessing file:// URL
remotely, but when running on Microsoft Windows using the native UNC approach
will work.
.IP FTP(S)
curl supports the File Transfer Protocol with a lot of tweaks and levers. With
or without using TLS.
.IP GOPHER(S)
Retrieve files.
.IP HTTP(S)
curl supports HTTP with numerous options and variations. It can speak HTTP
version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct
command line options.
.IP IMAP(S)
Using the mail reading protocol, curl can "download" emails for you. With or
without using TLS.
.IP LDAP(S)
curl can do directory lookups for you, with or without TLS.
.IP MQTT
curl supports MQTT version 3. Downloading over MQTT equals "subscribe" to a
topic while uploading/posting equals "publish" on a topic. MQTT over TLS is
not supported (yet).
.IP POP3(S)
Downloading from a pop3 server means getting a mail. With or without using
TLS.
.IP RTMP(S)
The Realtime Messaging Protocol is primarily used to server streaming media
and curl can download it.
.IP RTSP
curl supports RTSP 1.0 downloads.
.IP SCP
curl supports SSH version 2 scp transfers.
.IP SFTP
curl supports SFTP (draft 5) done over SSH version 2.
.IP SMB(S)
curl supports SMB version 1 for upload and download.
.IP SMTP(S)
Uploading contents to an SMTP server means sending an email. With or without
TLS.
.IP TELNET
Telling curl to fetch a telnet URL starts an interactive session where it
sends what it reads on stdin and outputs what the server sends it.
.IP TFTP
curl can do TFTP downloads and uploads.
.SH "PROGRESS METER"
curl normally displays a progress meter during operations, indicating the
amount of transferred data, transfer speeds and estimated time left, etc. The
progress meter displays the transfer rate in bytes per second. The suffixes
(k, M, G, T, P) are 1024 based. For example 1k is 1024 bytes. 1M is 1048576
bytes.
curl displays this data to the terminal by default, so if you invoke curl to
do an operation and it is about to write data to the terminal, it
\fIdisables\fP the progress meter as otherwise it would mess up the output
mixing progress meter and response data.
If you want a progress meter for HTTP POST or PUT requests, you need to
redirect the response output to a file, using shell redirect (>), \fI\-o, \-\-output\fP or
similar.
This does not apply to FTP upload as that operation does not spit out any
response data to the terminal.
If you prefer a progress "bar" instead of the regular meter, \fI\-#, \-\-progress-bar\fP is
your friend. You can also disable the progress meter completely with the
\fI\-s, \-\-silent\fP option.
.SH OPTIONS
Options start with one or two dashes. Many of the options require an
additional value next to them.
The short "single-dash" form of the options, \-d for example, may be used with
or without a space between it and its value, although a space is a recommended
separator. The long "double-dash" form, \fI\-d, \-\-data\fP for example, requires a space
between it and its value.
Short version options that do not need any additional values can be used
immediately next to each other, like for example you can specify all the
options \-O, \-L and \-v at once as \-OLv.
In general, all boolean options are enabled with \-\-\fBoption\fP and yet again
disabled with \-\-\fBno-\fPoption. That is, you use the same option name but
prefix it with "no-". However, in this list we mostly only list and show the
\-\-option version of them.
.IP "\-\-abstract-unix-socket "
(HTTP) Connect through an abstract Unix domain socket, instead of using the network.
Note: netstat shows the path of an abstract socket prefixed with '@', however
the argument should not have this leading character.
If \fI\-\-abstract-unix-socket\fP is provided several times, the last set value will be used.
Example:
.nf
curl --abstract-unix-socket socketpath https://example.com
.fi
See also \fI--unix-socket\fP. Added in 7.53.0.
.IP "\-\-alt-svc "
(HTTPS) 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.
Specify a "" file name (zero length) to avoid loading/saving and make curl
just handle the cache in memory.
If this option is used several times, curl will load contents from all the
files but the last one will be used for saving.
\fI\-\-alt-svc\fP can be used several times in a command line
Example:
.nf
curl --alt-svc svc.txt https://example.com
.fi
See also \fI--resolve\fP and \fI--connect-to\fP. Added in 7.64.1.
.IP "\-\-anyauth"
(HTTP) 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
request and checking the response-headers, thus possibly inducing an extra
network round-trip. This is used instead of setting a specific authentication
method, which you can do with \fI\-\-basic\fP, \fI\-\-digest\fP, \fI\-\-ntlm\fP, and \fI\-\-negotiate\fP.
Using \fI\-\-anyauth\fP is not recommended if you do uploads from stdin, since it may
require data to be sent twice and then the client must be able to rewind. If
the need should arise when uploading from stdin, the upload operation will
fail.
Used together with \fI\-u, \-\-user\fP.
Providing \fI\-\-anyauth\fP multiple times has no extra effect.
Example:
.nf
curl --anyauth --user me:pwd https://example.com
.fi
See also \fI--proxy-anyauth\fP, \fI--basic\fP and \fI--digest\fP.
.IP "\-a, \-\-append"
(FTP SFTP) When used in an upload, this makes curl append to the target file instead of
overwriting it. If the remote file does not exist, it will be created. Note
that this flag is ignored by some SFTP servers (including OpenSSH).
Providing \fI\-a, \-\-append\fP multiple times has no extra effect.
Disable it again with \-\-no-append.
Example:
.nf
curl --upload-file local --append ftp://example.com/
.fi
See also \fI-r, --range\fP and \fI-C, --continue-at\fP.
.IP "\-\-aws-sigv4 "
Use AWS V4 signature authentication in the transfer.
The provider argument is a string that is used by the algorithm when creating
outgoing authentication headers.
The region argument is a string that points to a geographic area of
a resources collection (region-code) when the region name is omitted from
the endpoint.
The service argument is a string that points to a function provided by a cloud
(service-code) when the service name is omitted from the endpoint.
If \fI\-\-aws-sigv4\fP is provided several times, the last set value will be used.
Example:
.nf
curl --aws-sigv4 "aws:amz:east-2:es" --user "key:secret" https://example.com
.fi
See also \fI--basic\fP and \fI-u, --user\fP. Added in 7.75.0.
.IP "\-\-basic"
(HTTP) 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
previously set option that sets a different authentication method (such as
\fI\-\-ntlm\fP, \fI\-\-digest\fP, or \fI\-\-negotiate\fP).
Used together with \fI\-u, \-\-user\fP.
Providing \fI\-\-basic\fP multiple times has no extra effect.
Example:
.nf
curl -u name:password --basic https://example.com
.fi
See also \fI--proxy-basic\fP.
.IP "\-\-cacert "
(TLS) 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
format. Normally curl is built to use a default file for this, so this option
is typically used to alter that default file.
curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is
set, and uses the given path as a path to a CA cert bundle. This option
overrides that variable.
The windows version of curl will automatically look for a CA certs file named
\(aqcurl-ca-bundle.crt', either in the same directory as curl.exe, or in the
Current Working Directory, or in any folder along your PATH.
If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
(libnsspem.so) needs to be available for this option to work properly.
(iOS and macOS only) If curl is built against Secure Transport, then this
option is supported for backward compatibility with other SSL engines, but it
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).
If \fI\-\-cacert\fP is provided several times, the last set value will be used.
Example:
.nf
curl --cacert CA-file.txt https://example.com
.fi
See also \fI--capath\fP and \fI-k, --insecure\fP.
.IP "\-\-capath "
(TLS) Tells curl to use the specified certificate directory to verify the
peer. Multiple paths can be provided by separating them with ":" (e.g.
\(dqpath1:path2:path3"). The certificates must be in PEM format, and if curl is
built against OpenSSL, the directory must have been processed using the
c_rehash utility supplied with OpenSSL. Using \fI\-\-capath\fP can allow
OpenSSL-powered curl to make SSL-connections much more efficiently than using
\fI\-\-cacert\fP if the \fI\-\-cacert\fP file contains many CA certificates.
If this option is set, the default capath value will be ignored.
If \fI\-\-capath\fP is provided several times, the last set value will be used.
Example:
.nf
curl --capath /local/directory https://example.com
.fi
See also \fI--cacert\fP and \fI-k, --insecure\fP.
.IP "\-\-cert-status"
(TLS) Tells curl to verify the status of the server certificate by using the
Certificate Status Request (aka. OCSP stapling) TLS extension.
If this option is enabled and the server sends an invalid (e.g. expired)
response, if the response suggests that the server certificate has been
revoked, or no response at all is received, the verification fails.
This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
Providing \fI\-\-cert-status\fP multiple times has no extra effect.
Disable it again with \-\-no-cert-status.
Example:
.nf
curl --cert-status https://example.com
.fi
See also \fI--pinnedpubkey\fP. Added in 7.41.0.
.IP "\-\-cert-type "
(TLS) Tells curl what type the provided client certificate is using. PEM, DER, ENG
and P12 are recognized types.
The default type depends on the TLS backend and is usually PEM, however for
Secure Transport and Schannel it is P12. If \fI\-E, \-\-cert\fP is a pkcs11: URI then ENG is
the default type.
If \fI\-\-cert-type\fP is provided several times, the last set value will be used.
Example:
.nf
curl --cert-type PEM --cert file https://example.com
.fi
See also \fI-E, --cert\fP, \fI--key\fP and \fI--key-type\fP.
.IP "\-E, \-\-cert "
(TLS) 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
PKCS#12 format if using Secure Transport, or PEM format if using any other
engine. If the optional password is not specified, it will be queried for on
the terminal. Note that this option assumes a certificate file that is the
private key and the client certificate concatenated. See \fI\-E, \-\-cert\fP and \fI\-\-key\fP to
specify them independently.
In the portion of the argument, you must escape the character ":"
as "\\:" so that it is not recognized as the password delimiter. Similarly, you
must escape the character "\\" as "\\\\" so that it is not recognized as an
escape character.
If curl is built against the NSS SSL library then this option can tell
curl the nickname of the certificate to use within the NSS database defined
by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
loaded.
If you provide a path relative to the current directory, you must prefix the
path with "./" in order to avoid confusion with an NSS database nickname.
If curl is built against OpenSSL library, and the engine pkcs11 is available,
then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
a PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option will be set
as "pkcs11" if none was provided and the \fI\-\-cert-type\fP option will be set as
\(dqENG" if none was provided.
(iOS and macOS only) If curl is built against Secure Transport, then the
certificate string can either be the name of a certificate/private key in the
system or user keychain, or the path to a PKCS#12-encoded certificate and
private key. If you want to use a file from the current directory, please
precede it with "./" prefix, in order to avoid confusion with a nickname.
(Schannel only) Client certificates must be specified by a path
expression to a certificate store. (Loading PFX is not supported; you can
import it to a store first). You can use
\(dq\\\\" to refer to a certificate
in the system certificates store, for example,
\(dqCurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is
usually a SHA-1 hex string which you can see in certificate details. Following
store locations are supported: CurrentUser, LocalMachine, CurrentService,
Services, CurrentUserGroupPolicy, LocalMachineGroupPolicy,
LocalMachineEnterprise.
If \fI\-E, \-\-cert\fP is provided several times, the last set value will be used.
Example:
.nf
curl --cert certfile --key keyfile https://example.com
.fi
See also \fI--cert-type\fP, \fI--key\fP and \fI--key-type\fP.
.IP "\-\-ciphers "
(TLS) 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:
.nf
https://curl.se/docs/ssl-ciphers.html
.fi
If \fI\-\-ciphers\fP is provided several times, the last set value will be used.
Example:
.nf
curl --ciphers ECDHE-ECDSA-AES256-CCM8 https://example.com
.fi
See also \fI--tlsv1.3\fP.
.IP "\-\-compressed-ssh"
(SCP SFTP) Enables built-in SSH compression.
This is a request, not an order; the server may or may not do it.
Providing \fI\-\-compressed-ssh\fP multiple times has no extra effect.
Disable it again with \-\-no-compressed-ssh.
Example:
.nf
curl --compressed-ssh sftp://example.com/
.fi
See also \fI--compressed\fP. Added in 7.56.0.
.IP "\-\-compressed"
(HTTP) Request a compressed response using one of the algorithms curl supports, and
automatically decompress the content. Headers are not modified.
If this option is used and the server sends an unsupported encoding, curl will
report an error. This is a request, not an order; the server may or may not
deliver data compressed.
Providing \fI\-\-compressed\fP multiple times has no extra effect.
Disable it again with \-\-no-compressed.
Example:
.nf
curl --compressed https://example.com
.fi
See also \fI--compressed-ssh\fP.
.IP "\-K, \-\-config "
Specify a text file to read curl arguments from. The command line arguments
found in the text file will be used as if they were provided on the command
line.
Options and their parameters must be specified on the same line in the file,
separated by whitespace, colon, or the equals sign. Long option names can
optionally be given in the config file without the initial double dashes and
if so, the colon or equals characters can be used as separators. If the option
is specified with one or two dashes, there can be no colon or equals character
between the option and its parameter.
If the parameter contains whitespace (or starts with : or =), the parameter
must be enclosed within quotes. Within double quotes, the following escape
sequences are available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash
preceding any other letter is ignored.
If the first column of a config line is a '#' character, the rest of the line
will be treated as a comment.
Only write one option per physical line in the config file.
Specify the filename to \fI\-K, \-\-config\fP as '-' to make curl read the file from stdin.
Note that to be able to specify a URL in the config file, you need to specify
it using the \fI\-\-url\fP option, and not by simply writing the URL on its own
line. So, it could look similar to this:
url = "https://curl.se/docs/"
.nf
# \-\-\- Example file \-\-\-
# this is a comment
url = "example.com"
output = "curlhere.html"
user-agent = "superagent/1.0"
.fi
.nf
# and fetch another URL too
url = "example.com/docs/manpage.html"
\-O
referer = "http://nowhereatall.example.com/"
# \-\-\- End of example file \-\-\-
.fi
When curl is invoked, it (unless \fI\-q, \-\-disable\fP is used) checks for a default
config file and uses it if found, even when \fI\-K, \-\-config\fP is used. The default
config file is checked for in the following places in this order:
1) "$CURL_HOME/.curlrc"
2) "$XDG_CONFIG_HOME/.curlrc" (Added in 7.73.0)
3) "$HOME/.curlrc"
4) Windows: "%USERPROFILE%\\.curlrc"
5) Windows: "%APPDATA%\\.curlrc"
6) Windows: "%USERPROFILE%\\Application Data\\.curlrc"
7) Non-Windows: use getpwuid to find the home directory
8) On Windows, if it finds no .curlrc file in the sequence described above, it
checks for one in the same dir the curl executable is placed.
On Windows two filenames are checked per location: .curlrc and _curlrc,
preferring the former. Older versions on Windows checked for _curlrc only.
\fI\-K, \-\-config\fP can be used several times in a command line
Example:
.nf
curl --config file.txt https://example.com
.fi
See also \fI-q, --disable\fP.
.IP "\-\-connect-timeout "
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
will continue \- if not it will exit. Since version 7.32.0, this option
accepts decimal values.
The "connection phase" is considered complete when the requested TCP, TLS or
QUIC handshakes are done.
The decimal value needs to provided using a dot (.) as decimal separator \- not
the local version even if it might be using another separator.
If \fI\-\-connect-timeout\fP is provided several times, the last set value will be used.
Examples:
.nf
curl --connect-timeout 20 https://example.com
curl --connect-timeout 3.14 https://example.com
.fi
See also \fI-m, --max-time\fP.
.IP "\-\-connect-to "
For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead.
This option is suitable to direct requests at a specific server, e.g. at a
specific cluster node in a cluster of servers. This option is only used to
establish the network connection. It does NOT affect the hostname/port that is
used for TLS/SSL (e.g. SNI, certificate verification) or for the application
protocols. "HOST1" and "PORT1" may be the empty string, meaning "any
host/port". "HOST2" and "PORT2" may also be the empty string, meaning "use the
request's original host/port".
A "host" specified to this option is compared as a string, so it needs to
match the name used in request URL. It can be either numerical such as
\(dq127.0.0.1" or the full host name such as "example.org".
\fI\-\-connect-to\fP can be used several times in a command line
Example:
.nf
curl --connect-to example.com:443:example.net:8443 https://example.com
.fi
See also \fI--resolve\fP and \fI-H, --header\fP. Added in 7.49.0.
.IP "\-C, \-\-continue-at "
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
of the source file before it is transferred to the destination. If used with
uploads, the FTP server command SIZE will not be used by curl.
Use "-C \-" to tell curl to automatically find out where/how to resume the
transfer. It then uses the given output/input files to figure that out.
If \fI\-C, \-\-continue-at\fP is provided several times, the last set value will be used.
Examples:
.nf
curl -C - https://example.com
curl -C 400 https://example.com
.fi
See also \fI-r, --range\fP.
.IP "\-c, \-\-cookie-jar "
(HTTP) 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
given file at the end of operations. If no cookies are known, no data will be
written. The file will be written using the Netscape cookie file format. If
you set the file name to a single dash, "-", the cookies will be written to
stdout.
This command line option will activate the cookie engine that makes curl
record and use cookies. Another way to activate it is to use the \fI\-b, \-\-cookie\fP
option.
If the cookie jar cannot be created or written to, the whole curl operation
will not fail or even report an error clearly. Using \fI\-v, \-\-verbose\fP will get a
warning displayed, but that is the only visible feedback you get about this
possibly lethal situation.
If \fI\-c, \-\-cookie-jar\fP is provided several times, the last set value will be used.
Examples:
.nf
curl -c store-here.txt https://example.com
curl -c store-here.txt -b read-these https://example.com
.fi
See also \fI-b, --cookie\fP.
.IP "\-b, \-\-cookie "
(HTTP) 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 data
should be in the format "NAME1=VALUE1; NAME2=VALUE2". This makes curl use the
cookie header with this content explicitly in all outgoing request(s). If
multiple requests are done due to authentication, followed redirects or
similar, they will all get this cookie passed on.
If no '=' symbol is used in the argument, it is instead treated as a filename
to read previously stored cookie from. This option also activates the cookie
engine which will make curl record incoming cookies, which may be handy if
you are using this in combination with the \fI\-L, \-\-location\fP option or do multiple URL
transfers on the same invoke. If the file name is exactly a minus ("-"), curl
will instead read the contents from stdin.
The file format of the file to read cookies from should be plain HTTP headers
(Set-Cookie style) or the Netscape/Mozilla cookie file format.
The file specified with \fI\-b, \-\-cookie\fP is only used as input. No cookies will be
written to the file. To store cookies, use the \fI\-c, \-\-cookie-jar\fP option.
If you use the Set-Cookie file format and do not specify a domain then the
cookie is not sent since the domain will never match. To address this, set a
domain in Set-Cookie line (doing that will include sub-domains) or preferably:
use the Netscape format.
Users often want to both read cookies from a file and write updated cookies
back to a file, so using both \fI\-b, \-\-cookie\fP and \fI\-c, \-\-cookie-jar\fP in the same command
line is common.
\fI\-b, \-\-cookie\fP can be used several times in a command line
Examples:
.nf
curl -b cookiefile https://example.com
curl -b cookiefile -c cookiefile https://example.com
.fi
See also \fI-c, --cookie-jar\fP and \fI-j, --junk-session-cookies\fP.
.IP "\-\-create-dirs"
When used in conjunction with the \fI\-o, \-\-output\fP option, curl will create the
necessary local directory hierarchy as needed. This option creates the
directories mentioned with the \fI\-o, \-\-output\fP option, nothing else. If the \fI\-o, \-\-output\fP
file name uses no directory, or if the directories it mentions already exist,
no directories will be created.
Created dirs are made with mode 0750 on unix style file systems.
To create remote directories when using FTP or SFTP, try \fI\-\-ftp-create-dirs\fP.
Providing \fI\-\-create-dirs\fP multiple times has no extra effect.
Disable it again with \-\-no-create-dirs.
Example:
.nf
curl --create-dirs --output local/dir/file https://example.com
.fi
See also \fI--ftp-create-dirs\fP and \fI--output-dir\fP.
.IP "\-\-create-file-mode "
(SFTP SCP FILE) 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
at creation time, instead of the default 0644.
This option takes an octal number as argument.
If \fI\-\-create-file-mode\fP is provided several times, the last set value will be used.
Example:
.nf
curl --create-file-mode 0777 -T localfile sftp://example.com/new
.fi
See also \fI--ftp-create-dirs\fP. Added in 7.75.0.
.IP "\-\-crlf"
(FTP SMTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
(SMTP added in 7.40.0)
Providing \fI\-\-crlf\fP multiple times has no extra effect.
Disable it again with \-\-no-crlf.
Example:
.nf
curl --crlf -T file ftp://example.com/
.fi
See also \fI-B, --use-ascii\fP.
.IP "\-\-crlfile "
(TLS) Provide a file using PEM format with a Certificate Revocation List that may
specify peer certificates that are to be considered revoked.
If \fI\-\-crlfile\fP is provided several times, the last set value will be used.
Example:
.nf
curl --crlfile rejects.txt https://example.com
.fi
See also \fI--cacert\fP and \fI--capath\fP.
.IP "\-\-curves "
(TLS) 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
them with ":" (e.g. "X25519:P-521"). The parameter is available identically
in the "openssl s_client/s_server" utilities.
\fI\-\-curves\fP allows a OpenSSL powered curl to make SSL-connections with exactly
the (EC) curve requested by the client, avoiding nontransparent client/server
negotiations.
If this option is set, the default curves list built into openssl will be
ignored.
If \fI\-\-curves\fP is provided several times, the last set value will be used.
Example:
.nf
curl --curves X25519 https://example.com
.fi
See also \fI--ciphers\fP. Added in 7.73.0.
.IP "\-\-data-ascii "
(HTTP) This is just an alias for \fI\-d, \-\-data\fP.
\fI\-\-data-ascii\fP can be used several times in a command line
Example:
.nf
curl --data-ascii @file https://example.com
.fi
See also \fI--data-binary\fP, \fI--data-raw\fP and \fI--data-urlencode\fP.
.IP "\-\-data-binary "
(HTTP) This posts data exactly as specified with no extra processing whatsoever.
If you start the data with the letter @, the rest should be a filename. Data
is posted in a similar manner as \fI\-d, \-\-data\fP does, except that newlines and
carriage returns are preserved and conversions are never done.
Like \fI\-d, \-\-data\fP the default content-type sent to the server is
application/x-www-form-urlencoded. If you want the data to be treated as
arbitrary binary data by the server then set the content-type to octet-stream:
\-H "Content-Type: application/octet-stream".
If this option is used several times, the ones following the first will append
data as described in \fI\-d, \-\-data\fP.
\fI\-\-data-binary\fP can be used several times in a command line
Example:
.nf
curl --data-binary @filename https://example.com
.fi
See also \fI--data-ascii\fP.
.IP "\-\-data-raw "
(HTTP) This posts data similarly to \fI\-d, \-\-data\fP but without the special
interpretation of the @ character.
\fI\-\-data-raw\fP can be used several times in a command line
Examples:
.nf
curl --data-raw "hello" https://example.com
curl --data-raw "@at@at@" https://example.com
.fi
See also \fI-d, --data\fP. Added in 7.43.0.
.IP "\-\-data-urlencode "
(HTTP) This posts data, similar to the other \fI\-d, \-\-data\fP options with the exception
that this performs URL-encoding.
To be CGI-compliant, the part should begin with a \fIname\fP followed
by a separator and a content specification. The part can be passed to
curl using one of the following syntaxes:
.RS
.IP "content"
This will make curl URL-encode the content and pass that on. Just be careful
so that the content does not contain any = or @ symbols, as that will then make
the syntax match one of the other cases below!
.IP "=content"
This will make curl URL-encode the content and pass that on. The preceding =
symbol is not included in the data.
.IP "name=content"
This will make curl URL-encode the content part and pass that on. Note that
the name part is expected to be URL-encoded already.
.IP "@filename"
This will make curl load data from the given file (including any newlines),
URL-encode that data and pass it on in the POST.
.IP "name@filename"
This will make curl load data from the given file (including any newlines),
URL-encode that data and pass it on in the POST. The name part gets an equal
sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
name is expected to be URL-encoded already.
.RE
\fI\-\-data-urlencode\fP can be used several times in a command line
Examples:
.nf
curl --data-urlencode name=val https://example.com
curl --data-urlencode =encodethis https://example.com
curl --data-urlencode name@file https://example.com
curl --data-urlencode @fileonly https://example.com
.fi
See also \fI-d, --data\fP and \fI--data-raw\fP.
.IP "\-d, \-\-data "
(HTTP MQTT) 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
submit button. This will cause curl to pass the data to the server using the
content-type application/x-www-form-urlencoded. Compare to \fI\-F, \-\-form\fP.
\fI\-\-data-raw\fP is almost the same but does not have a special interpretation of
the @ character. To post data purely binary, you should instead use the
\fI\-\-data-binary\fP option. To URL-encode the value of a form field you may use
\fI\-\-data-urlencode\fP.
If any of these options is used more than once on the same command line, the
data pieces specified will be merged with a separating &-symbol. Thus, using
\(aq-d name=daniel \-d skill=lousy' would generate a post chunk that looks like
\(aqname=daniel&skill=lousy'.
If you start the data with the letter @, the rest should be a file name to
read the data from, or \- if you want curl to read the data from stdin. Posting
data from a file named 'foobar' would thus be done with \fI\-d, \-\-data\fP @foobar. When
\fI\-d, \-\-data\fP is told to read from a file like that, carriage returns and newlines
will be stripped out. If you do not want the @ character to have a special
interpretation use \fI\-\-data-raw\fP instead.
\fI\-d, \-\-data\fP can be used several times in a command line
Examples:
.nf
curl -d "name=curl" https://example.com
curl -d "name=curl" -d "tool=cmdline" https://example.com
curl -d @filename https://example.com
.fi
See also \fI--data-binary\fP, \fI--data-urlencode\fP and \fI--data-raw\fP. This option is mutually exclusive to \fI-F, --form\fP and \fI-I, --head\fP and \fI-T, --upload-file\fP.
.IP "\-\-delegation "
(GSS/kerberos) Set LEVEL to tell the server what it is allowed to delegate when it
comes to user credentials.
.RS
.IP "none"
Do not allow any delegation.
.IP "policy"
Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
service ticket, which is a matter of realm policy.
.IP "always"
Unconditionally allow the server to delegate.
.RE
If \fI\-\-delegation\fP is provided several times, the last set value will be used.
Example:
.nf
curl --delegation "none" https://example.com
.fi
See also \fI-k, --insecure\fP and \fI--ssl\fP.
.IP "\-\-digest"
(HTTP) 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
combination with the normal \fI\-u, \-\-user\fP option to set user name and password.
Providing \fI\-\-digest\fP multiple times has no extra effect.
Disable it again with \-\-no-digest.
Example:
.nf
curl -u name:password --digest https://example.com
.fi
See also \fI-u, --user\fP, \fI--proxy-digest\fP and \fI--anyauth\fP. This option is mutually exclusive to \fI--basic\fP and \fI--ntlm\fP and \fI--negotiate\fP.
.IP "\-\-disable-eprt"
(FTP) 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
before using PORT, but with this option, it will use PORT right away. EPRT and
LPRT are extensions to the original FTP protocol, and may not work on all
servers, but they enable more functionality in a better way than the
traditional PORT command.
\-\-eprt can be used to explicitly enable EPRT again and \-\-no-eprt is an alias
for \fI\-\-disable-eprt\fP.
If the server is accessed using IPv6, this option will have no effect as EPRT
is necessary then.
Disabling EPRT only changes the active behavior. If you want to switch to
passive mode you need to not use \fI\-P, \-\-ftp-port\fP or force it with \fI\-\-ftp-pasv\fP.
Providing \fI\-\-disable-eprt\fP multiple times has no extra effect.
Disable it again with \-\-no-disable-eprt.
Example:
.nf
curl --disable-eprt ftp://example.com/
.fi
See also \fI--disable-epsv\fP and \fI-P, --ftp-port\fP.
.IP "\-\-disable-epsv"
(FTP) 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
PASV, but with this option, it will not try using EPSV.
\-\-epsv can be used to explicitly enable EPSV again and \-\-no-epsv is an alias
for \fI\-\-disable-epsv\fP.
If the server is an IPv6 host, this option will have no effect as EPSV is
necessary then.
Disabling EPSV only changes the passive behavior. If you want to switch to
active mode you need to use \fI\-P, \-\-ftp-port\fP.
Providing \fI\-\-disable-epsv\fP multiple times has no extra effect.
Disable it again with \-\-no-disable-epsv.
Example:
.nf
curl --disable-epsv ftp://example.com/
.fi
See also \fI--disable-eprt\fP and \fI-P, --ftp-port\fP.
.IP "\-q, \-\-disable"
If used as the first parameter on the command line, the \fIcurlrc\fP config
file will not be read and used. See the \fI\-K, \-\-config\fP for details on the default
config file search path.
Providing \fI\-q, \-\-disable\fP multiple times has no extra effect.
Disable it again with \-\-no-disable.
Example:
.nf
curl -q https://example.com
.fi
See also \fI-K, --config\fP.
.IP "\-\-disallow-username-in-url"
(HTTP) This tells curl to exit if passed a URL containing a username. This is probably
most useful when the URL is being provided at runtime or similar.
Providing \fI\-\-disallow-username-in-url\fP multiple times has no extra effect.
Disable it again with \-\-no-disallow-username-in-url.
Example:
.nf
curl --disallow-username-in-url https://example.com
.fi
See also \fI--proto\fP. Added in 7.61.0.
.IP "\-\-dns-interface "
(DNS) Tell curl to send outgoing DNS requests through . This option is a
counterpart to \fI\-\-interface\fP (which does not affect DNS). The supplied string
must be an interface name (not an address).
If \fI\-\-dns-interface\fP is provided several times, the last set value will be used.
Example:
.nf
curl --dns-interface eth0 https://example.com
.fi
See also \fI--dns-ipv4-addr\fP and \fI--dns-ipv6-addr\fP. \fI--dns-interface\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
.IP "\-\-dns-ipv4-addr "
(DNS) Tell curl to bind to when making IPv4 DNS requests, so that
the DNS requests originate from this address. The argument should be a
single IPv4 address.
If \fI\-\-dns-ipv4-addr\fP is provided several times, the last set value will be used.
Example:
.nf
curl --dns-ipv4-addr 10.1.2.3 https://example.com
.fi
See also \fI--dns-interface\fP and \fI--dns-ipv6-addr\fP. \fI--dns-ipv4-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
.IP "\-\-dns-ipv6-addr "
(DNS) Tell curl to bind to when making IPv6 DNS requests, so that
the DNS requests originate from this address. The argument should be a
single IPv6 address.
If \fI\-\-dns-ipv6-addr\fP is provided several times, the last set value will be used.
Example:
.nf
curl --dns-ipv6-addr 2a04:4e42::561 https://example.com
.fi
See also \fI--dns-interface\fP and \fI--dns-ipv4-addr\fP. \fI--dns-ipv6-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
.IP "\-\-dns-servers "
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
may also optionally be given as \fI:\fP after each IP
address.
If \fI\-\-dns-servers\fP is provided several times, the last set value will be used.
Example:
.nf
curl --dns-servers 192.168.0.1,192.168.0.2 https://example.com
.fi
See also \fI--dns-interface\fP and \fI--dns-ipv4-addr\fP. \fI--dns-servers\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
.IP "\-\-doh-cert-status"
Same as \fI\-\-cert-status\fP but used for DoH (DNS-over-HTTPS).
Providing \fI\-\-doh-cert-status\fP multiple times has no extra effect.
Disable it again with \-\-no-doh-cert-status.
Example:
.nf
curl --doh-cert-status --doh-url https://doh.example https://example.com
.fi
See also \fI--doh-insecure\fP. Added in 7.76.0.
.IP "\-\-doh-insecure"
Same as \fI\-k, \-\-insecure\fP but used for DoH (DNS-over-HTTPS).
Providing \fI\-\-doh-insecure\fP multiple times has no extra effect.
Disable it again with \-\-no-doh-insecure.
Example:
.nf
curl --doh-insecure --doh-url https://doh.example https://example.com
.fi
See also \fI--doh-url\fP. Added in 7.76.0.
.IP "\-\-doh-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.
Some SSL options that you set for your transfer will apply to DoH since the
name lookups take place over SSL. However, the certificate verification
settings are not inherited and can be controlled separately via
\fI\-\-doh-insecure\fP and \fI\-\-doh-cert-status\fP.
This option is unset if an empty string "" is used as the URL. (Added in
7.85.0)
If \fI\-\-doh-url\fP is provided several times, the last set value will be used.
Example:
.nf
curl --doh-url https://doh.example https://example.com
.fi
See also \fI--doh-insecure\fP. Added in 7.62.0.
.IP "\-D, \-\-dump-header "
(HTTP FTP) Write the received protocol headers to the specified file. If no headers are
received, the use of this option will create an empty file.
When used in FTP, the FTP server response lines are considered being "headers"
and thus are saved there.
Having multiple transfers in one set of operations (i.e. the URLs in one
\fI\-:, \-\-next\fP clause), will append them to the same file, seperated by a blank line.
If \fI\-D, \-\-dump-header\fP is provided several times, the last set value will be used.
Example:
.nf
curl --dump-header store.txt https://example.com
.fi
See also \fI-o, --output\fP.
.IP "\-\-egd-file "
(TLS) Deprecated option. This option is ignored by curl since 7.84.0. Prior to that
it only had an effect on curl if built to use old versions of OpenSSL.
Specify the path name to the Entropy Gathering Daemon socket. The socket is
used to seed the random engine for SSL connections.
If \fI\-\-egd-file\fP is provided several times, the last set value will be used.
Example:
.nf
curl --egd-file /random/here https://example.com
.fi
See also \fI--random-file\fP.
.IP "\-\-engine "
(TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI\-\-engine\fP
list to print a list of build-time supported engines. Note that not all (and
possibly none) of the engines may be available at runtime.
If \fI\-\-engine\fP is provided several times, the last set value will be used.
Example:
.nf
curl --engine flavor https://example.com
.fi
See also \fI--ciphers\fP and \fI--curves\fP.
.IP "\-\-etag-compare "
(HTTP) 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
stored ETag.
For correct results, make sure that the specified file contains only a
single line with the desired ETag. An empty file is parsed as an empty
ETag.
Use the option \fI\-\-etag-save\fP to first save the ETag from a response, and
then use this option to compare against the saved ETag in a subsequent
request.
If \fI\-\-etag-compare\fP is provided several times, the last set value will be used.
Example:
.nf
curl --etag-compare etag.txt https://example.com
.fi
See also \fI--etag-save\fP and \fI-z, --time-cond\fP. Added in 7.68.0.
.IP "\-\-etag-save "
(HTTP) This option saves an HTTP ETag to the specified file. An ETag is a
caching related header, usually returned in a response.
If no ETag is sent by the server, an empty file is created.
If \fI\-\-etag-save\fP is provided several times, the last set value will be used.
Example:
.nf
curl --etag-save storetag.txt https://example.com
.fi
See also \fI--etag-compare\fP. Added in 7.68.0.
.IP "\-\-expect100-timeout "
(HTTP) 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
default curl will wait one second. This option accepts decimal values! When
curl stops waiting, it will continue as if the response has been received.
The decimal value needs to provided using a dot (.) as decimal separator \- not
the local version even if it might be using another separator.
If \fI\-\-expect100-timeout\fP is provided several times, the last set value will be used.
Example:
.nf
curl --expect100-timeout 2.5 -T file https://example.com
.fi
See also \fI--connect-timeout\fP. Added in 7.47.0.
.IP "\-\-fail-early"
Fail and exit on the first detected transfer error.
When curl is used to do multiple transfers on the command line, it will
attempt to operate on each given URL, one by one. By default, it will ignore
errors if there are more URLs given and the last URL's success will determine
the error code curl returns. So early failures will be "hidden" by subsequent
successful transfers.
Using this option, curl will instead return an error on the first transfer
that fails, independent of the amount of URLs that are given on the command
line. This way, no transfer failures go undetected by scripts and similar.
This option is global and does not need to be specified for each use of \fI\-:, \-\-next\fP.
This option does not imply \fI\-f, \-\-fail\fP, which causes transfers to fail due to the
server's HTTP status code. You can combine the two options, however note \fI\-f, \-\-fail\fP
is not global and is therefore contained by \fI\-:, \-\-next\fP.
Providing \fI\-\-fail-early\fP multiple times has no extra effect.
Disable it again with \-\-no-fail-early.
Example:
.nf
curl --fail-early https://example.com https://two.example
.fi
See also \fI-f, --fail\fP and \fI--fail-with-body\fP. Added in 7.52.0.
.IP "\-\-fail-with-body"
(HTTP) 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
returns an HTML document stating so (which often also describes why and
more). This flag will still allow curl to output and save that content but
also to return error 22.
This is an alternative option to \fI\-f, \-\-fail\fP which makes curl fail for the same
circumstances but without saving the content.
Providing \fI\-\-fail-with-body\fP multiple times has no extra effect.
Disable it again with \-\-no-fail-with-body.
Example:
.nf
curl --fail-with-body https://example.com
.fi
See also \fI-f, --fail\fP. This option is mutually exclusive to \fI-f, --fail\fP. Added in 7.76.0.
.IP "\-f, \-\-fail"
(HTTP) Fail fast with no output at all on server errors. This is useful to enable
scripts and users to better deal with failed attempts. In normal cases when an
HTTP server fails to deliver a document, it returns an HTML document stating
so (which often also describes why and more). This flag will prevent curl from
outputting that and return error 22.
This method is not fail-safe and there are occasions where non-successful
response codes will slip through, especially when authentication is involved
(response codes 401 and 407).
Providing \fI\-f, \-\-fail\fP multiple times has no extra effect.
Disable it again with \-\-no-fail.
Example:
.nf
curl --fail https://example.com
.fi
See also \fI--fail-with-body\fP. This option is mutually exclusive to \fI--fail-with-body\fP.
.IP "\-\-false-start"
(TLS) 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
server's Finished message, thus saving a round trip when performing a full
handshake.
This is currently only implemented in the NSS and Secure Transport (on iOS 7.0
or later, or OS X 10.9 or later) backends.
Providing \fI\-\-false-start\fP multiple times has no extra effect.
Disable it again with \-\-no-false-start.
Example:
.nf
curl --false-start https://example.com
.fi
See also \fI--tcp-fastopen\fP. Added in 7.42.0.
.IP "\-\-form-escape"
(HTTP) Tells curl to pass on names of multipart form fields and files using
backslash-escaping instead of percent-encoding.
If \fI\-\-form-escape\fP is provided several times, the last set value will be used.
Example:
.nf
curl --form-escape -F 'field\\name=curl' -F 'file=@load"this' https://example.com
.fi
See also \fI-F, --form\fP. Added in 7.81.0.
.IP "\-\-form-string "
(HTTP SMTP IMAP) Similar to \fI\-F, \-\-form\fP except that the value string for the named parameter is used
literally. Leading '@' and '<' characters, and the ';type=' string in
the value have no special meaning. Use this in preference to \fI\-F, \-\-form\fP if
there's any possibility that the string value may accidentally trigger the
\(aq@' or '<' features of \fI\-F, \-\-form\fP.
\fI\-\-form-string\fP can be used several times in a command line
Example:
.nf
curl --form-string "data" https://example.com
.fi
See also \fI-F, --form\fP.
.IP "\-F, \-\-form "
(HTTP SMTP IMAP) 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
Content-Type multipart/form-data according to RFC 2388.
For SMTP and IMAP protocols, this is the means to compose a multipart mail
message to transmit.
This enables uploading of binary files etc. To force the 'content' part to be
a file, prefix the file name with an @ sign. To just get the content part from
a file, prefix the file name with the symbol <. The difference between @ and <
is then that @ makes a file get attached in the post as a file upload, while
the < makes a text field and just get the contents for that text field from a
file.
Tell curl to read content from stdin instead of a file by using \- as
filename. This goes for both @ and < constructs. When stdin is used, the
contents is buffered in memory first by curl to determine its size and allow a
possible resend. Defining a part's data from a named non-regular file (such
as a named pipe or similar) is unfortunately not subject to buffering and will
be effectively read at transmission time; since the full size is unknown
before the transfer starts, such data is sent as chunks by HTTP and rejected
by IMAP.
Example: send an image to an HTTP server, where 'profile' is the name of the
form-field to which the file portrait.jpg will be the input:
.nf
curl \-F profile=@portrait.jpg https://example.com/upload.cgi
.fi
Example: send your name and shoe size in two text fields to the server:
.nf
curl \-F name=John \-F shoesize=11 https://example.com/
.fi
Example: send your essay in a text field to the server. Send it as a plain
text field, but get the contents for it from a local file:
.nf
curl \-F "story=HTML message