check curl status code