Exemple #1
0
        /// <summary>
        /// 采用httpwebrequest方式访问网络,根据传入的URl地址,得到响应的数据字符串。
        /// </summary>
        /// <param name="objHttpItems">参数列表</param>
        /// <param name="cookie">自动维护的字符串cookie</param>
        /// <returns>HttpResults 为返回结果</returns>
        public HttpResults GetHtml(HttpItems objHttpItems, ref string cookie)
        {
            //调用专门读取数据的类
            HttpResults res = GetHttpRequestData(objHttpItems);

            cookie     = new XJHTTP().UpdateCookie(cookie, res.Cookie);
            res.Cookie = cookie;
            return(res);
        }
Exemple #2
0
 /// <summary>
 /// 读取返回对象中数据,并返回Image格式图片
 /// </summary>
 /// <param name="hr">GetHtml后的请求结果</param>
 /// <returns></returns>
 public Image GetImg(HttpResults hr)
 {
     return(byteArrayToImage(hr.ResultByte));
 }