I don't really know why my code is breaking up at line 24, when it's trying to execute the first await method. I mean, it doesn't show me nor a compilation nor execution error. I already installed all 5 Jsonize packages the guide says. I think the problem could be because the call is not awaited, but I don't really know what might be happening.
I'm trying to follow step by step this guide about what I want to achieve. This is my goal: https://github.com/JackWFinlay/jsonize
Here is my entire code:
using Jsonize;
using Jsonize.Parser;
using Jsonize.Serializer;
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace JsonizeExample
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Testy();
}
public static async void Testy()
{
using (var client = new HttpClient())
{
string url = @"https://jackfinlay.com";
HttpResponseMessage response = await client.GetAsync(url);
string html = await response.Content.ReadAsStringAsync();
// The use of the parameterless constructors will use default settings.
JsonizeParser parser = new JsonizeParser();
JsonizeSerializer serializer = new JsonizeSerializer();
Jsonizer jsonizer = new Jsonizer(parser, serializer);
}
}
}
}
I'm working on Visual Studio 2019, .NET Core 3.1, C#.
What am I doing wrong?