.net 接受请求过来的流

//接收POST过来的数据
System.IO.Stream s = Request.InputStream;
int count = 0;
byte[] buffer = new byte[1024];
StringBuilder builder = new StringBuilder();
while ((count = s.Read(buffer, 0, 1024)) > 0)
{
builder.Append(Encoding.UTF8.GetString(buffer, 0, count));
}
s.Flush();
s.Close();
s.Dispose();

  这年纪了容易忘是 记一下

posted @ 2015-10-17 14:16  伤心木乃伊  阅读(309)  评论(0编辑  收藏  举报