.net接收post请求,并转为字符串
程序员文章站
2022-03-13 13:36:34
Stream s = Request.InputStream; int count = 0; byte[] buffer = new byte[1024]; StringBuilder reqXml = new StringBuilder(); while ((count = s.Read(buff ......
stream s = request.inputstream;
int count = 0;
byte[] buffer = new byte[1024];
stringbuilder reqxml = new stringbuilder();
while ((count = s.read(buffer, 0, 1024)) > 0)
{
reqxml.append(encoding.utf8.getstring(buffer, 0, count));
}
s.flush();
s.close();
s.dispose();
上一篇: 中餐座位礼仪是怎样的
下一篇: 茼蒿有毒吗?吃了会不会中毒?