From 81eb884b74a15e1b44838d87bd4737e0f192ac97 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 9 Mar 2020 11:25:51 +0800 Subject: [PATCH] Update curl.md Add example for how to check if a remote resource is available --- curl.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/curl.md b/curl.md index 20f19aa4b..c86153671 100644 --- a/curl.md +++ b/curl.md @@ -80,3 +80,9 @@ curl -u user:pass -d status="Hello" http://twitter.com/statuses/update.xml # multipart file upload curl -v -include --form key1=value1 --form upload=@localfilename URL ``` + +```bash +# Use Curl to Check if a remote resource is available +# details: https://matthewsetter.com/check-if-file-is-available-with-curl/ +curl -o /dev/null --silent -Iw "%{http_code}" https://example.com/my.remote.tarball.gz +```