Skip to content

Instantly share code, notes, and snippets.

@JoanM
Last active December 23, 2016 10:09
Show Gist options
  • Save JoanM/6b9605f297f31dfa9ce193adaf40ae6b to your computer and use it in GitHub Desktop.
Save JoanM/6b9605f297f31dfa9ce193adaf40ae6b to your computer and use it in GitHub Desktop.
Bynder Curl with ConfigureAwait
public async Task<string> DoCurlAsync()
{
using (var httpClient = new HttpClient())
using (var httpResponse = await httpClient.GetAsync("https://www.bynder.com").ConfigureAwait(false))
{
return await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment