public async Task <bool> DoLogoutAsync() { RestRequest request = new RestRequest( "/api/v2/authentication/logout", Method.POST); request.AddHeader("content-type", "application/json"); request.AddHeader("accept", "application/json"); //add cookies which contains the login information _client.AddCookies(request, Cookies); IRestResponse <Session> response = await _client.ExecuteAsync <Session>( request); if (response.StatusCode == System.Net.HttpStatusCode.OK) { Session emptySession = response.Data; return(true); } else { return(false); } }