I simply want to send login data via https and receive the response. The whole thing runs in Visual Studio 2017. When running the program stops when I click the "Login button". I also get no real error but only an unhandled exception.
I'm new to C # maybe i did something wrong with async? Thanks in advance :)
public static async Task<string> GetResponseText(string address)
{
using (var httpClient = new HttpClient())
return await httpClient.GetStringAsync(address);
}
public void On_Login_Listener(Object sender, EventArgs args)
{
string url = "https://localhost/login.php?email=" + email.Text+"&password="+password.Text;
InfoBox.Text = GetResponseText(url).ToString();
}