//
Stream writer = request.GetRequestStream()
GetRequestStream()总提示System.NotSupportedException 类型的异常;网了好久,好像没多少人碰到过。望大侠指点下,谢谢。
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
Stream stream = resp.GetResponseStream();
//获取响应内容
using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
{
result = reader.ReadToEnd();
}
return result;
加了using好了!!!!
这个是要看你发送的请求,单纯的这段代码看不出问题