Example #1
0
 public static void Process(HttpListenerContext context)
 {
     try
     {
         WebPage webPage = new WebPage(context.Request);
         BrowserResponse.Send(webPage, context.Response);
     }
     catch (Exception e)
     {
         WebPage webPage = new WebPage();
         BrowserResponse.Send(webPage, context.Response);
     }
 }
        public static void Process(HttpListenerContext context)
        {
            string responseText;
            try
            {
                string filePath = ParseUrl(context.Request);
                responseText = System.IO.File.ReadAllText(filePath);
            }
            catch (Exception e)
            {
                responseText = "Resource Not Found ";
            }
            

            BrowserResponse.Send(responseText, context.Response);
        }
Example #3
0
 public static void Process(HttpListenerContext context)
 {
     BrowserResponse.Send("<html><body><h1>Message</h1></body></html>", context.Response);
 }
Example #4
0
 public void Process(HttpListenerContext context)
 {
     BrowserResponse.Send()
 }
Example #5
0
 public void Process(HttpListenerContext context)
 {
     BrowserResponse.Send("<html><body> Message</body></html>")
 }