I am trying to get the response status code using command line CURL with proxy.
This returns the whole page, but I want just the status code. How do I do that? thank you.
curl -sL -w -x IP:PORT “%{http_code}\n” “http://www.example.com” -o /dev/null
You were very close, the -w was just put in the wrong spot. Use it like this: