Esempio n. 1
0
        public void Reserve(UnityWebRequest req)
        {
            if (!req.IsSuccess())
            {
                return;
            }

            foreach (var kv in SetCookieParser.Parse(req))
            {
                _cookieDic[kv.Key] = kv.Value;
            }
        }
Esempio n. 2
0
        private static IEnumerator SendWithLog(UnityWebRequest req)
        {
            yield return(req.SendWebRequest());

            if (!req.IsSuccess())
            {
                Debug.LogError(req.error);
                yield break;
            }

            if (req.downloadHandler != null)
            {
                Debug.Log(req.downloadHandler.text);
            }
            else
            {
                Debug.Log("Done.");
            }
        }