Last active
April 16, 2022 06:37
-
-
Save paulogdm/93cf32684383a42fa1414649271c9c7a to your computer and use it in GitHub Desktop.
Useful `dig` and `curl` commands
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
# Query any record | |
dig A paulogdm.com | |
dig NS paulogdm.com | |
dig CNAME www.paulogdm.com | |
# Query any record using a specific DNS resolver | |
dig A paulogdm.com @1.1.1.1 | |
dig A paulogdm.com @8.8.8.8 | |
# Query record with a trace of the DNS resolution | |
dig NS paulogdm.com @1.1.1.1 +trace | |
# Get headers | |
curl https://paulogdm.com -I | |
# Get a specific header | |
curl https://paulogdm.com -I | grep etag | |
# Make a POST request | |
curl -d '{"key1":"value1"}' -H "Content-Type: application/json" -X POST http://paulogdm.com/api | |
# Check if SSL is working as expected from the Vercel server | |
# Useful for "Zero Downtime" migrations. | |
curl https://paulogdm.com --resolve paulogdm.com:443:76.76.21.21 -I |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment