After some more testing with the curl 65 error I have found the following
.error returns Unknown Error
.isdone returns true
.responsecode returns 0
.result returns ConnectionError
.uploadedBytes returns 13
Below is the code. It will work most of the time but then sometimes it just throws the curl 65 error,It Doesn’t even try and contact the server. I am assuming it is a bug in the base code somewhere, I have included my code used to reproduce this error in Unity 2021.3.0f1 but it has been around for a long time.
WWWForm form = new WWWForm();
form.AddField("aaaa", "7");
form.AddField("bbbb", "11");
string urlsend = urltoserverphpfile;
using (UnityWebRequest www = UnityWebRequest.Post(urlsend, form))
{
www.timeout = 10;
yield return www.SendWebRequest();
if (www.result == UnityWebRequest.Result.Success)
{
string returndata = www.downloadHandler.text;
Debug.Log(returndata);
}
else
{
Debug.Log(" aa: " + www.error + "bb: " + www.isDone + "cc: " + www.responseCode + "dd: " + www.result + "ee: " + www.uploadedBytes);
}
}