static string _host = "https://astuteincservices.com";
A method named LogMeIn() returns an instance of DGLogInRequest with your credentials.
static void GetOffCount(string token)
{
HttpClient apiClient = new HttpClient();
string route = "/api/hub";
var json = JsonConvert.SerializeObject(LogMeIn());
var strContent = new StringContent(json, UnicodeEncoding.UTF8, "application/json");
apiClient.DefaultRequestHeaders.Clear();
apiClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = apiClient.PostAsync(_host + route + "/offcount", strContent).Result;
Console.WriteLine(response.StatusCode);
Console.WriteLine("-------------------");
Console.WriteLine("Off Count: " + response.Content.ReadAsStringAsync().Result);
}
static void FlurlGetOffCount(string token)
{
var response = _host.AppendPathSegment("/api/hub/offcount").WithOAuthBearerToken(token).PostJsonAsync(LogMeIn()).Result;
Console.WriteLine(response.StatusCode);
Console.WriteLine("-------------------");
Console.WriteLine("Off Count: " + response.Content.ReadAsStringAsync().Result);
}