Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hannesbe/3ef476e42c97749c8a0d1275fe0c9a9a to your computer and use it in GitHub Desktop.
Save hannesbe/3ef476e42c97749c8a0d1275fe0c9a9a to your computer and use it in GitHub Desktop.
Display request headers with command line curl and follow redirects
#!/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