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]); }

  

posted @ 2017-12-13 10:41  公众号python学习开发  阅读(574)  评论(0编辑  收藏  举报