private dynamic GetHealthStatus() { var status = Config.HealthStatus(); var content = HealthCheckSerializer.Serialize(status); var response = Response.AsText(content, "application/json"); response.StatusCode = status.IsHealty ? HttpStatusCode.OK : HttpStatusCode.InternalServerError; return(response); }
private Response GetHealthStatus() { var status = Config.HealthStatus(); var content = JsonHealthChecks.BuildJson(status); var response = Response.AsText(content, "application/json"); if (!healthChecksAlwaysReturnHttpStatusOk) { response.StatusCode = status.IsHealthy ? HttpStatusCode.OK : HttpStatusCode.InternalServerError; } else { response.StatusCode = HttpStatusCode.OK; } return(response); }