So, what we have since Unity 4 is following code:
string url = "https://www.domain.com/test.php?var1=value1&var2=value2";
string credentials = "user:pass";
Dictionary<string, string> headers = new Dictionary<string, string>() { { "Authorization", "Basic " + System.Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(credentials)) } };
WWW www = new WWW(url, null, headers);
yield return www;
if (www.error != null) {
// error handling
Debug.LogWarning (string.Format ("Error: {0}", www.error));
yield break;
}
// work with www result
It’s a bit simplified, the url is %-escaped.
This worked fine from unity 4 to 5.6.2, but is not working anymore in unity 2017.1.0f3.
Now it throws an error without an error message.
What has changed there?
Thanks!