コード例 #1
0
ファイル: WyxClient.cs プロジェクト: cool8868/H5Nball
        protected override void PrepareArgs(IWebArgs args)
        {
            var wyxArgs = args as WyxWebArgs;

            if (null == wyxArgs)
            {
                return;
            }
            wyxArgs.AppKey    = WyxCache.AppCfg.AppKey;
            wyxArgs.Timestamp = WeiboUtil.GetTimeStamp().ToString();
            if (!this.NoSesssionKey && !string.IsNullOrEmpty(_session.SessionKey))
            {
                wyxArgs.SessionKey = _session.SessionKey;
            }
            var signKeys = wyxArgs.GetCollection().AllKeys;

            Array.Sort(signKeys);
            var    signDic = wyxArgs.ToCollection(true, signKeys);
            string baseStr = WebUtil.BuildEscapeDataString(signDic);

            signDic.Clear();
            wyxArgs.Signature = CryptoUtil.GetSHA1(baseStr + WyxCache.AppCfg.AppSecret, "x2");
        }
コード例 #2
0
 protected virtual void PrepareArgs(IWebArgs args)
 {
 }
コード例 #3
0
 protected WebClientBase(string uri, IWebArgs getArgs = null, IWebArgs postArgs = null)
 {
     this._baseUri  = uri;
     this._getArgs  = getArgs;
     this._postArgs = postArgs;
 }
コード例 #4
0
 protected virtual void PrepareFormArgs(IWebArgs args)
 {
     this.PrepareArgs(args);
 }