HttpWebRequest GetResponse 问题(急)
MyRequest.Method = "POST" ;
MyRequest.ContentType = "application/x-www-form-urlencoded";
MyRequest.ProtocolVersion = HttpVersion.Version10 ;
MyRequest.ContentLength = data.Length;
Stream outstream = null;
outstream = MyRequest.GetRequestStream();
outstream.Write(data,0,data.Length);
outstream.Close();
MyResponse = (HttpWebResponse)MyRequest.GetResponse();
通过网络监视器跟踪发现HttpWebRequest类型对象调用GetResponse方法
向web服务器POST数据时发送了两条Http请求,第一条是正常的POST Request头
单不包括data部分,第二条是continuation response packet,这一条中包括data
部分。
通过IE浏览器POST数据,则data部分是在POST Request消息中一次发送过去的。
有的服务器不能识别 continuation response packet 虽然它也符合HTTP协议。
请高手指教如何设置HttpWebResponse参数使调用GetResponse方法后向服务器
发送一条请求,类似IE的方式,非常感谢!