Skip to content

Instantly share code, notes, and snippets.

@redmcg
Created November 12, 2018 08:58
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 redmcg/7d81ef833c77bee6965b5f441006f697 to your computer and use it in GitHub Desktop.
Save redmcg/7d81ef833c77bee6965b5f441006f697 to your computer and use it in GitHub Desktop.
Simple Web Request test (fails under Wine with dotnet install and IPv6 disabled)
using System;
using System.Net;
public class WRTest
{
public static void Main ()
{
WebRequest req = WebRequest.Create("http://www.google.com");
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
Console.WriteLine(resp.StatusDescription);
resp.Close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment