Im a newbie in programming..I prepared a ConsoleApp in Visual Studio 2017 using the following code...
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HttpClientStatus
{
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var result = await client.GetAsync("http://webcode.me");
Console.WriteLine(result.StatusCode);
}
}
}
The Build ran successfully but after executing the exe file nothing seemed to show up on the screen
The Output at the console was supposed to be like this..
$ dotnet run
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My html page</title>
</head>
<body>
<p>
Today is a beautiful day. We go swimming and fishing.
</p>
<p>
Hello there. How are you?
</p>
</body>
</html>
Kindly help..
Regards...