源码:HttpWebRequest request = (HttpWebRequest)WebRequest.Create(action);
request.Method = "POST";
request.UserAgent = "Jakarta Commons-HttpClient/2.0rc3";
request.ContentLength = data.Length;
request.ContentType = "application/x-www-form-urlencoded";
Stream postStream = request.GetRequestStream();
postStream.Write(data, 0, data.Length);
postStream.Close();
我想在POST XML数据到网站上的时候,将数据进行application/x-www-form-urlencoded编码再上传,但是如上处理后,上传的数据并未进行编码,比如将< />转换为%3C %3E之类的请大虾们看看怎么才能达到这个效果