Hello.
I’m preparing my game for publishing on ArmorGames.com
I use their [API ](https://forum.unity.com/https: //armorgames.readme.io/docs/2_authentication_service#section-parameters) to get the id of the current user:
https://services.armorgames.com/services/rest/v1/authenticate/user.json
When I click on this link in the browser, I get the correct answer.
When sending a GET request through my build, I get an error: HTTP / 1.1 415 Unsupported Media Type
IEnumerator GetText (Action <string> callback)
{
string url;
url = "https://services.armorgames.com/services/rest/v1/authenticate/user.json";
UnityWebRequest www = UnityWebRequest.Get (url);
www.SetRequestHeader ("Content-Type", "application/json");
yield return www.SendWebRequest ();
if (www.isNetworkError || www.isHttpError) {
Debug.Log ("MyError:" + www.error);
callback (null);
}
else {
Debug.Log ("resp:" + www.downloadHandler.text);
callback (www.downloadHandler.text);
}
}
What could be the problem?
I tried both with the addition of “Content-Type”, “application/json”, and without. The result is the same.