how to get response from curl code example
Example 1: curl post request
curl -d "user=user1&pass=abcd" -X POST https://example.com/login
Example 2: get status code of curl
curl -o /dev/null -s -w "%{http_code}\n" http://localhost
curl -d "user=user1&pass=abcd" -X POST https://example.com/login
curl -o /dev/null -s -w "%{http_code}\n" http://localhost