check the HTTP response code