WebHeaderCollection类
.net添加http报头
string[] allKeys = WebHeaderCollection.AllKeys; for (int i = 0; i < allKeys.Length; i++) { string name = allKeys[i]; HttpWebRequest.Headers.Add(name,WebHeaderCollection.Header[name]); }
.net添加http报头
string[] allKeys = WebHeaderCollection.AllKeys; for (int i = 0; i < allKeys.Length; i++) { string name = allKeys[i]; HttpWebRequest.Headers.Add(name,WebHeaderCollection.Header[name]); }