C# 一般应用程序获取请求报文

    public class Check : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string sendStr = string.Empty;

            using (StreamReader resder = new StreamReader(context.Request.InputStream))
            {
                sendStr = resder.ReadToEnd().Trim();
            }


            string res = AutoReceiverServer.Check(sendStr);
            context.Response.Write(res);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }

 

posted @ 2023-08-30 15:58  博客YS  阅读(111)  评论(0编辑  收藏  举报