.net2.0 sp2
HttpWebRequest post数据如何在http1.1的头中加上Connection: Keep-Alive
Accept: */*
Accept-Language: zh-cn
useragent: Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 5.0)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727 sp2)
Host: aaaaaaaaaa.com
Content-Length: 86
Connection: Keep-Alive 如何加上?????
Cache-Control: no-cache
这几天也在研究HttpWebRequest类,但是好象我构造的请求没设置connection属性,就自动为Keep-Alive了我觉得是不是根据请求资源决定的,
也可以connection=true
HttpWebRequest.Connection = "Keep-Alive"
这不可以
@小妮爹: HttpWebRequest.Headers.Add("Connection","Keep-Alive");