curl 用法总结

curl -g -k --noproxy '*' -s -o /dev/null -w '%{http_code}' http://172.25.112.34/identity/v3

KSURL=https://github.com/bazelbuild/bazel/releases/latest

$ curl -Ls -w %{url_effective} -o /dev/null $KSURL
https://github.com/bazelbuild/bazel/releases/tag/0.16.1

$ curl -s -o /dev/null -I -w "HTTP_CODE: %{http_code}\nREDIRECT_URL: %{redirect_url}\n" $KSURL
HTTP_CODE: 302
REDIRECT_URL: https://github.com/bazelbuild/bazel/releases/tag/0.16.1

$ curl -w "%{url_effective}\n" -I -L -s -S $KSURL -o /dev/null
https://github.com/bazelbuild/bazel/releases/tag/0.16.1

get redirect url

上一篇:一步一步开发Game服务器(一)


下一篇:C#_Wpf_DataContex上下文整个类绑定