private async static Task <TModel> CallApi <TModel>(string baseUri, string resource, HttpMethod method = null) where TModel : class, new() { if (method == null) { method = HttpMethod.Get; } using (var client = new JsonClient(baseUri)) { return(await client.ExecuteAsync <TModel>(new JsonRequest(resource, method))); } }