curl get response info code example
Example 1: curl get example
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://hostname/resource
Example 2: get status code of curl
curl -o /dev/null -s -w "%{http_code}\n" http://localhost