check response statusCode and headers