Exemple #1
0
        void Awake()
        {
            _instance = gameObject.GetComponent <HttpAPI>();
            jsonDic.Add("Content-Type", "application/json");
            AuthDic.Add("Content-Type", "application/json");
            string NameAndPw = UserName + ":" + PassWord;

            AuthDic.Add("Authorization", "Basic" + System.Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(NameAndPw)));
        }
        void Awake()
        {
            DontDestroyOnLoad (gameObject);
            HttpAPI._instacne = gameObject.GetComponent<HttpAPI> ();

            JsonDic.Add("Content-Type", "application/json");

            AuthDic.Add("Content-Type", "application/json");
            string NameAndPw = UserName + ":" + Password;
            AuthDic.Add("Authorization", "Basic " + System.Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(NameAndPw)) );
        }