2020-07-08 curl
2020-07-08 本文已影响0人
cityhash123
参数解释
-L --location 如果页面重定向了,将会继续抓取下一跳的结果
(HTTP) If the server reports that the requested page has moved to a different location (indicated with a Loca-
tion: header and a 3XX response code), this option will make curl redo the request on the new place. If used
together with -i, --include or -I, --head, headers from all requested pages will be shown.
-i --include 返回的信息包含 HTTP 头信息
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 and more...
To view the request headers, consider the -v, --verbose option.
-I --head 只返回HTTP的头信息
-S, --show-error
When used with -s, --silent, it makes curl show an error message if it fails.
-s, --silent
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 terminal/stdout unless you redirect it.
Use -S, --show-error in addition to this option to disable progress meter but still show error messages.
See also -v, --verbose and --stderr.
curl -sSL https://xx.com
curl -L https://xxx.com