Ejemplo n.º 1
0
        public Dictionary <string, string> RequestHeaderDic(string requestMethod, string url, Dictionary <string, object> parameters = null)
        {
            if (!this.isInitialized)
            {
                return(null);
            }
            string headerCommon = this.RequestHeaderString(requestMethod, url, parameters);

            this.guid        = NpDeviceInfo.GetGuid();
            this.adid        = NpDeviceInfo.GetAdid();
            this.countryCode = NpDeviceInfo.GetLocaleLanguageAndCountry();
            return(this.SetHeaderCommon(headerCommon));
        }
Ejemplo n.º 2
0
        private IEnumerator OauthInitialize(string uuid, MonoBehaviour _behaviour)
        {
            this.isInitializedError = false;
            this.mErrData           = new NpOAuthErrData();
            this.guid        = NpDeviceInfo.GetGuid();
            this.adid        = NpDeviceInfo.GetAdid();
            this.countryCode = NpDeviceInfo.GetLocaleLanguageAndCountry();
            string authHeader = this.InitialRequestHeaderString(uuid, "json");
            Dictionary <string, string> headersDic = this.SetHeaderCommon(authHeader);

            headersDic.Add("X-AppVer", this.X_AppVer);
            NpDebugLog.Log(this.X_AppVer);
            Dictionary <string, object> postDic = new Dictionary <string, object>();

            postDic.Add("x_uuid", uuid);
            OAuthConnect oAuthConnect = new OAuthConnect(_behaviour, new Action <WWW>(this.OnHttpResponse), this.timeOut, new Action(this.OnTimeOutErr));

            yield return(_behaviour.StartCoroutine(oAuthConnect.OAuthPostRequest(this.initURL, postDic, headersDic)));

            yield break;
        }