Created
August 29, 2021 06:23
-
-
Save tedliou/c9ffeab41f10f1dcff4b5718a513cb16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Text resultText; | |
private IEnumerator GetResult(string token) | |
{ | |
var postData = new List<IMultipartFormSection>(); | |
postData.Add(new MultipartFormDataSection("Token", token)); | |
var www = UnityWebRequest.Post("http://192.168.50.150/login.php", postData); | |
yield return www.SendWebRequest(); | |
if (www.result != UnityWebRequest.Result.Success) | |
{ | |
resultText.text = www.error; | |
} | |
else | |
{ | |
resultText.text = www.downloadHandler.text; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment