Quantcast
Channel: Questions in topic: "httpwebrequest"
Viewing all articles
Browse latest Browse all 190

Why is UnityWebRequest.Result.ConnectionError always true?

$
0
0
Everything worked yesterday. Now I have to comment out UnityWebRequest.Result.ConnectionError to make it work. IEnumerator GetScores(string url) { using (UnityWebRequest webRequest = UnityWebRequest.Get(url)) { retrievingScores = true; webRequest.useHttpContinue = false; yield return webRequest.SendWebRequest(); if (webRequest.isDone) { // if (webRequest.result == UnityWebRequest.Result.ConnectionError) // { // if (webRequest.result == UnityWebRequest.Result.ProtocolError) // { if (webRequest.downloadHandler.text != "-1") { /// do my thing } else { retrievingScoresError = true; Debug.Log("-1 error"); } /* } else { retrievingScoresError = true; Debug.Log("Protocol Error"); } } else { retrievingScoresError = true; Debug.Log("Network Error"); } */ } } } and this is the function calling it public void GetAllScores(bool forceLoad = false) { if (lastLoad == 0 || Time.time - lastLoad > 600 || forceLoad) { StartCoroutine(GetScores("https://www.dyflexion.piscesstudios.com/php/getscores.php?data=" + AESEncryption("my password"))); lastLoad = Time.time; } } here is this full https link you can try yourself. The data shows up. [https://dyflexion.piscesstudios.com/php/getscores.php?data=7YMlXVn1BIyDUkW9Lw/amLtpD2bVWwx88WlvWKUGU5k=][1] [1]: https://dyflexion.piscesstudios.com/php/getscores.php?data=7YMlXVn1BIyDUkW9Lw/amLtpD2bVWwx88WlvWKUGU5k=

Viewing all articles
Browse latest Browse all 190


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>