Last active
November 13, 2019 23:24
-
-
Save christopher-hopper/4a9694ba1c1f4692cacd849a9bd1cae1 to your computer and use it in GitHub Desktop.
RESTful API testing response headers using wget or curl
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
# 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