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); }
public static void Process(HttpListenerContext context) { BrowserResponse.Send("<html><body><h1>Message</h1></body></html>", context.Response); }
public void Process(HttpListenerContext context) { BrowserResponse.Send() }
public void Process(HttpListenerContext context) { BrowserResponse.Send("<html><body> Message</body></html>") }