Add function to retrieve http status code using curl