Created
November 12, 2018 08:58
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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