Add status check endpoint
This commit is contained in:
parent
857a793bf5
commit
4e28893225
|
@ -44,5 +44,10 @@ namespace HabitSharp
|
|||
req.AddUrlSegment("model", ModelName);
|
||||
return this.Execute<Result<Dictionary<string, string>>>(req);
|
||||
}
|
||||
|
||||
public bool CheckStatus() {
|
||||
var result = this.Execute<Result<Dictionary<string, string>>>(new RestRequest("status"));
|
||||
return result.Success && result.Data.ContainsKey("status") && result.Data["status"] == "up";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue