Skip to content

Instantly share code, notes, and snippets.

@pzurek
Created August 8, 2013 08:50
Show Gist options
  • Save pzurek/6182872 to your computer and use it in GitHub Desktop.
Save pzurek/6182872 to your computer and use it in GitHub Desktop.
Fails on Mono...
using System;
using System.Net.Http;
namespace VendTest
{
class MainClass
{
public static void Main(string[] args)
{
Client client = new Client();
client.HttpClientCall();
}
}
public class Client
{
HttpClient client;
public Client()
{
client = new HttpClient();
}
public async void HttpClientCall()
{
HttpClient httpClient = new HttpClient();
HttpResponseMessage response = await httpClient.GetAsync("http://vendhq.com");
string responseAsString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseAsString);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment