The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

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.

I have made a sample repo for what I am trying to do.
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("");
    var pokemon = await response.Content.ReadAsStringAsync();

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.

Godot version 3.2.2
in Engine by (23 points)
edited by

1 Answer

0 votes

You did not forget about Same-origin policy?


Cert store bundled with godot's mono is outdated. Your only option is recompile with updated certificates.

by (887 points)
edited by

While I appreciate what you are trying to ask, I have updated my question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.