Use --server-response -qO /dev/null
:
wget --server-response -qO /dev/null [URL]
Example:
wget --server-response -qO /dev/null https://techoverflow.net
Example output:
HTTP/1.1 200 OK Server: nginx/1.14.0 (Ubuntu) Date: Mon, 18 Nov 2019 02:15:19 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Set-Cookie: cookielawinfo-checkbox-necessary=yes; expires=Mon, 18-Nov-2019 03:15:18 GMT; Max-Age=3600; path=/ Set-Cookie: cookielawinfo-checkbox-non-necessary=yes; expires=Mon, 18-Nov-2019 03:15:18 GMT; Max-Age=3600; path=/ Link: <https://techoverflow.net/wp-json/>; rel="https://api.w.org/"