📄 curl.html
字号:
<p class="level1">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 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 5xx response code or an HTTP 5xx response code. <p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries. By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Added in 7.12.3) <p class="level1">If this option is used multiple times, the last occurrence decide the amount. <p class="level0"><a name="--retry-delay"></a><span class="nroffip">--retry-delay <seconds></span> <p class="level1">Make curl sleep this amount of time between each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between retries). This option is only interesting if <a class="emphasis" href="#--retry">--retry</a> is also used. Setting this delay to zero will make curl use the default backoff time. (Added in 7.12.3) <p class="level1">If this option is used multiple times, the last occurrence decide the amount. <p class="level0"><a name="--retry-max-time"></a><span class="nroffip">--retry-max-time <seconds></span> <p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request´s maximum time, use <a class="emphasis" href="#-m--max-time">-m/--max-time</a>. Set this option to zero to not timeout retries. (Added in 7.12.3) <p class="level1">If this option is used multiple times, the last occurrence decide the amount. <p class="level0"><a name="-s--silent"></a><span class="nroffip">-s/--silent</span> <p class="level1">Silent mode. Don't show progress meter or error messages. Makes Curl mute. <p class="level1">If this option is used twice, the second will again disable silent mode. <p class="level0"><a name="-S--show-error"></a><span class="nroffip">-S/--show-error</span> <p class="level1">When used with -s it makes curl show error message if it fails. <p class="level1">If this option is used twice, the second will again disable show error. <p class="level0"><a name="--socks4"></a><span class="nroffip">--socks4 <host[:port]></span> <p class="level1">Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.15.2) <p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. <p class="level1">If this option is used several times, the last one will be used. <p class="level0"><a name="--socks5"></a><span class="nroffip">--socks5 <host[:port]></span> <p class="level1">Use the specified SOCKS5 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.11.1) <p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. <p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.) <p class="level0"><a name="--stderr"></a><span class="nroffip">--stderr <file></span> <p class="level1">Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout. This option has no point when you're using a shell with decent redirecting capabilities. <p class="level1">If this option is used several times, the last one will be used. <p class="level0"><a name="--tcp-nodelay"></a><span class="nroffip">--tcp-nodelay</span> <p class="level1">Turn on the TCP_NODELAY option. See the <span Class="emphasis">curl_easy_setopt(3)</span> man page for details about this option. (Added in 7.11.2) <p class="level1">If this option is used several times, each occurrence toggles this on/off. <p class="level0"><a name="-t--telnet-option"></a><span class="nroffip">-t/--telnet-option <OPT=val></span> <p class="level1">Pass options to the telnet protocol. Supported options are: <p class="level1">TTYPE=<term> Sets the terminal type. <p class="level1">XDISPLOC=<X display> Sets the X display location. <p class="level1">NEW_ENV=<var,val> Sets an environment variable. <p class="level0"><a name="-T--upload-file"></a><span class="nroffip">-T/--upload-file <file></span> <p class="level1">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 must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on a http(s) server, the PUT command will be used. <p class="level1">Use the file name "-" (a single dash) to use stdin instead of a given file. <p class="level1">You can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T 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: <p class="level1">curl -T "{file1,file2}" <a href="http://www.uploadtothissite.com">http://www.uploadtothissite.com</a> <p class="level1">or even <p class="level1">curl -T "img[1-1000].png" <a href="ftp://ftp.picturemania.com/upload/">ftp://ftp.picturemania.com/upload/</a> <p class="level0"><a name="--trace"></a><span class="nroffip">--trace <file></span> <p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout. <p class="level1">If this option is used several times, the last one will be used. <p class="level0"><a name="--trace-ascii"></a><span class="nroffip">--trace-ascii <file></span> <p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout. <p class="level1">This is very similar to <a class="emphasis" href="#--trace">--trace</a>, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller output that might be easier to read for untrained humans. <p class="level1">If this option is used several times, the last one will be used. <p class="level0"><a name="--trace-time"></a><span class="nroffip">--trace-time</span> <p class="level1">Prepends a time stamp to each trace or verbose line that curl displays. (Added in 7.14.0) <p class="level1">If this option is used several times, each occurrence will toggle it on/off. <p class="level0"><a name="-u--user"></a><span class="nroffip">-u/--user <user:password></span> <p class="level1">Specify user and password to use for server authentication. Overrides <a class="emphasis" href="#-n--netrc">-n/--netrc</a> and <a class="emphasis" href="#--netrc-optional">--netrc-optional</a>. <p class="level1">If you use an SSPI-enabled curl binary and do NTLM autentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-u :". <p class="level1">If this option is used several times, the last one will be used. <p class="level0"><a name="-U--proxy-user"></a><span class="nroffip">-U/--proxy-user <user:password></span> <p class="level1">Specify user and password to use for proxy authentication. <p class="level1">If you use an SSPI-enabled curl binary and do NTLM autentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-U :". <p class="level1">If this option is used several times, the last one will be used. <p class="level0"><a name="--url"></a><span class="nroffip">--url <URL></span> <p class="level1">Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file. <p class="level1">This option may be used any number of times. To control where this URL is written, use the <a class="emphasis" href="#-o--output">-o/--output</a> or the <a class="emphasis" href="#-O--remote-name">-O/--remote-name</a> options. <p class="level0"><a name="-v--verbose"></a><span class="nroffip">-v/--verbose</span> <p class="level1">Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines starting with '>' means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases and lines starting with '*' means additional info provided by curl. <p class="level1">Note that if you only want HTTP headers in the output, <a class="emphasis" href="#-i--include">-i/--include</a> might be option you're looking for. <p class="level1">If you think this option still doesn't give you enough details, consider using <a class="emphasis" href="#--trace">--trace</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> instead. <p class="level1">If this option is used twice, the second will again disable verbose. <p class="level0"><a name="-V--version"></a><span class="nroffip">-V/--version</span> <p class="level1">Displays information about curl and the libcurl version it uses. <p class="level1">The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable. <p class="level1">The second line (starts with "Protocols:") shows all protocols that libcurl reports to support. <p class="level1">The third line (starts with "Features:") shows specific features libcurl reports to offer. Available features include: <p class="level2"><p class="level1"><a name="IPv6"></a><span class="nroffip">IPv6</span> <p class="level2">You can use IPv6 with this. <p class="level1"><a name="krb4"></a><span class="nroffip">krb4</span> <p class="level2">Krb4 for ftp is supported. <p class="level1"><a name="SSL"></a><span class="nroffip">SSL</span> <p class="level2">HTTPS and FTPS are supported. <p class="level1"><a name="libz"></a><span class="nroffip">libz</span> <p class="level2">Automatic decompression of compressed files over HTTP is supported. <p class="level1"><a name="NTLM"></a><span class="nroffip">NTLM</span> <p class="level2">NTLM authentication is supported. <p class="level1"><a name="GSS-Negotiate"></a><span class="nroffip">GSS-Negotiate</span> <p class="level2">Negotiate authentication is supported. <p class="level1"><a name="Debug"></a><span class="nroffip">Debug</span> <p class="level2">This curl uses a libcurl built with Debug. This enables more error-tracking and memory debugging etc. For curl-developers only! <p class="level1"><a name="AsynchDNS"></a><span class="nroffip">AsynchDNS</span> <p class="level2">This curl uses asynchronous name resolves. <p class="level1"><a name="SPNEGO"></a><span class="nroffip">SPNEGO</span> <p class="level2">SPNEGO Negotiate authentication is supported. <p class="level1"><a name="Largefile"></a><span class="n
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -