.net接收post请求,并转为字符串
程序员文章站
2022-06-26 09:22:05
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();
下一篇: el-upload限制图片上传的方法解析