Update curl.md

Add example for how to check if a remote resource is available
This commit is contained in:
Hsieh Chin Fan 2020-03-09 11:25:51 +08:00 committed by GitHub
parent 447de944e4
commit 81eb884b74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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
```