資源簡介
C#HttpHelper實現了C#HttpWebRequest抓取時無視編碼,無視證書,無視Cookie,并且實現的代理的功能,使用它您可以進行Get和Post請求,可以很方便 的設置Cookie,證書,代理,編碼問題您不用管,因為類會自動為您識別網頁的編碼。
HttpHelper類,用來實現Http訪問,Post或者Get方式的,直接訪問,帶Cookie的,帶證書的等方式,可以設置代理。
代碼片段和文件信息
///?
///?類說明:HttpHelper類,用來實現Http訪問,Post或者Get方式的,直接訪問,帶Cookie的,帶證書的等方式,可以設置代理
///?重要提示:請不要自行修改本類,如果因為你自己修改后將無法升級到新版本。如果確實有什么問題請到官方網站提建議,
///?我們一定會及時修改
///?編碼日期:2011-09-20
///?編?碼?人:蘇飛
///?聯系方式:361983679??
///?官方網址:http://www.sufeinet.com/thread-3-1-1.html
///?修改日期:2014-04-21
///?版?本?號:1.4.5
///?
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Net;
using?System.IO;
using?System.Text.Regularexpressions;
using?System.IO.Compression;
using?System.Security.Cryptography.X509Certificates;
using?System.Net.Security;
namespace?DotNet4.Utilities
{
????///?
????///?Http連接操作幫助類
????///?
????public?class?HttpHelper
????{
????????#region?預定義方法或者變更
????????//默認的編碼
????????private?Encoding?encoding?=?Encod
評論
共有 條評論