curl check response headers

C++
Just use '-ISs' flag options I:(only headers), sS:(silence and no errors) 
curl www.example -ISs
Source

Also in C++: