Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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