Exemple #1
0
        /// <summary>
        /// 无参构造函数 默认使用火狐浏览器UA
        /// </summary>
        public HttpInfo()
        {
            //实例化UA池
            UAPool uapool = new UAPool();

            //获得火狐UA
            User_Agent = uapool.GetUA("Windows 火狐");
        }
Exemple #2
0
        /// <summary>
        /// 实例化并传入请求地址
        /// </summary>
        /// <param name="Url">待请求的地址</param>
        public HttpInfo(String Url)
        {
            //实例化UA池
            UAPool uapool = new UAPool();

            //获得火狐UA
            User_Agent = uapool.GetUA("Windows 火狐");
            //设置请求地址
            RequestUrl = Url;
            //默认使用utf编码
            this.Encoding = Encoding.GetEncoding("utf-8");
        }