I am really struggling here to get the C# Httpclient to accept a https address. I keep throwign an erorr about Tls, and I have looked around but I have no idea how to get it to work.
EDIT:
I have made a sample repo for what I am trying to do. https://github.com/PoisnFang/PokeGodot
It is a pretty simple concept, the logic is in Lobby.cs when you press the host button I want it to call the pokeapi and print the info the console. When you run it though it will throw an error about Tls and I do not know how to fix it. I realize that it has to do with CORS and I need a SSL cert in order to request info from an HTTPS source, but I dont know how to actually implement that....
private async void GetDitto()
{
HttpClient client = new HttpClient();
var response = await client.GetAsync("https://pokeapi.co/api/v2/pokemon/ditto");
response.EnsureSuccessStatusCode();
var pokemon = await response.Content.ReadAsStringAsync();
GD.Print(pokemon);
}
I also realize that I CAN use the built in HHTPClient that Godot has in order to get THIS scenario to work, however for my future implementations it will NOT.