Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created April 14, 2018 06:51
Show Gist options
  • Save jskeet/cea820c42673a3a56638f83cb8d4b90d to your computer and use it in GitHub Desktop.
Save jskeet/cea820c42673a3a56638f83cb8d4b90d to your computer and use it in GitHub Desktop.
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
HttpClient client = new HttpClient();
Task<string> request = client.GetStringAsync("http://google.pl");
string result = await request;
Console.WriteLine(result.Length);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment