Skip to content

Instantly share code, notes, and snippets.

@shahriarhossain
Last active December 7, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahriarhossain/c7f34cb4b3a9f3624dad to your computer and use it in GitHub Desktop.
Save shahriarhossain/c7f34cb4b3a9f3624dad to your computer and use it in GitHub Desktop.
public class MailChimpReportsOverview
{
public async Task<ReportOverview> OverviewAsync(string endpoint)
{
private FileLogger logger = new FileLogger();
string content;
using (var client = new HttpClient())
{
try
{
Authenticate.ClientAuthentication(client);
content = await client.GetStringAsync(endpoint).ConfigureAwait(false);
}
catch (Exception ex)
{
logger.log(ex.ToString());
}
}
return JsonConvert.DeserializeObject<ReportOverview>(content);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment