Created
July 9, 2016 20:54
-
-
Save rvflash/24b1a3791ada681fc68888089bf4fb4a to your computer and use it in GitHub Desktop.
Display request headers with command line curl and follow redirects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
declare -- url="$1" | |
if [[ -z "$url" ]]; then | |
echo "Missing url" | |
exit 1 | |
fi | |
# @example https://goo.gl/ | |
curl -sLD - "$url" -o /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment