猿问

HttpWebRequest request

Stream writer = request.GetRequestStream()

GetRequestStream()总提示System.NotSupportedException 类型的异常;网了好久,好像没多少人碰到过。望大侠指点下,谢谢。


慕田峪7331174
浏览 856回答 1
1回答

蓝山帝景

HttpWebResponse resp = (HttpWebResponse)req.GetResponse();Stream stream = resp.GetResponseStream();//获取响应内容 using (StreamReader reader = new StreamReader(stream, Encoding.UTF8)){result = reader.ReadToEnd();}return result; 加了using
随时随地看视频慕课网APP
我要回答