Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RESTful API testing response headers using wget or curl
# RESTful API testing
# wget
# - method: GET
# - output: response headers only
wget --server-response --quiet \
--output-document=/dev/null --output-file=- \
https://example.com/api/endpoint
# curl
# - method: GET
# - output: response headers only
curl --insecure --head --location --silent \
https://example.com/api/endpoint
# curl
# - short non-posix options
# - output: response headers only
#
# -k insecure, ignore cert problems
# -I headers only
# -L follow location redirects
# -s silent, no progress
curl -kILs https://example.com/api/endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.