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"); }
protected virtual void PrepareArgs(IWebArgs args) { }
protected WebClientBase(string uri, IWebArgs getArgs = null, IWebArgs postArgs = null) { this._baseUri = uri; this._getArgs = getArgs; this._postArgs = postArgs; }
protected virtual void PrepareFormArgs(IWebArgs args) { this.PrepareArgs(args); }