Hi everyone,
can someone point me where could the problem be in this pieces of codes. For example, this works fine on in the Europe but in Canada and US not working.
Unfortunately, I am not from Canada and US and don’t know how to test and catch a log from there.
But do you see something here that could be for example IPv6 issue?
public static string APP_DESTINATION_LINK = "https://testlink.firebaseio.com/";
PATCH(Constants.APP_DESTINATION_LINK + "highscores.json", jsonFormat, OnSuccessfullyPatchHighscore);
private WWW PATCH(string url, string jsonFormat, System.Action onComplete)
{
byte[] body = Encoding.UTF8.GetBytes(jsonFormat);
Dictionary<string, string> headers = new Dictionary<string, string>();
headers.Add("Content-Type", "application/json");
headers.Add("Accept", "application/json");
headers.Add("X-HTTP-Method-Override", "PATCH");
WWW www = new WWW(url, body, headers);
StartCoroutine(WaitForRequest(www, onComplete));
return www;
}
private IEnumerator WaitForRequest(WWW www, System.Action onComplete)
{
yield return www;
// check for errors
if (www.error == null)
{
results = www.text;
//Debug.Log("www results -> " + results);
if (onComplete != null)
onComplete();
}
else
{
results = null;
}
}