From 4b2167dca35f12d0fe24b723451bc85ce2ea65f6 Mon Sep 17 00:00:00 2001 From: Fazle Arefin Date: Sat, 29 Aug 2020 21:21:09 +1000 Subject: [PATCH 1/2] Use curl to find out the http status code of a URL --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ba4824f..cd4538a 100644 --- a/README.md +++ b/README.md @@ -2488,6 +2488,11 @@ curl -I http://example.com/ # Vary: Accept-Encoding ``` +##### Find out the http status code of a URL +```bash +curl -s -o /dev/null -w "%{http_code}" https://www.google.com +``` + ##### Perform network throughput tests ```bash # server side: From 1e10f6f269a07482db17e21c0a77e98c9da2e0da Mon Sep 17 00:00:00 2001 From: Fazle Arefin Date: Sat, 29 Aug 2020 21:22:59 +1000 Subject: [PATCH 2/2] Use curl to unshorten a shortened URL --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index cd4538a..26b139e 100644 --- a/README.md +++ b/README.md @@ -2493,6 +2493,11 @@ curl -I http://example.com/ curl -s -o /dev/null -w "%{http_code}" https://www.google.com ``` +##### Unshorten a shortended URL +```bash +curl -s -o /dev/null -w "%{redirect_url}" https://bit.ly/34EFwWC +``` + ##### Perform network throughput tests ```bash # server side: