Hello. I used Photon Network to make a multiplay game. And I want to post player’s name which made of PhotonNetwork. Nickname class to http. I use this code.
IEnumerator Upload()
{
byte[] myData = System.Text.Encoding.UTF8.GetBytes(PhotonNetwork.NickName);
UnityWebRequest www = UnityWebRequest.Put("https://...", myData);
yield return www.SendWebRequest();
if (www.result != UnityWebRequest.Result.Success)
{
Debug.Log(www.error);
}
else
{
Debug.Log("Upload complete!");
}
}
But it gives me to HTTP/1.1 405 Method Not Allowed error. I checked my http server many times. Is there something wrong or can’t use this class for post player’s name to http ? I will really appreciate anything useful tips. Thank you.