You can use curl -i option to get the HTTP status code along with the response.
1 2 |
## Get status code details and responce curl -i https://reqres.in/api/users |
Get only the response with curl command
1 2 |
## Get only responce curl https://reqres.in/api/users |
Get only the staus code details with curl command
1 2 |
## Get only status code details curl -I https://reqres.in/api/users |
Get only the http status code in curl command
1 2 |
## Get only http status code curl -o /dev/null -s -w "%{http_code}\n" https://reqres.in/api/users |
Get all details with curl command
1 2 |
## Get even more details along with responce curl -iv https://reqres.in/api/users |