This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Task BasicHttpServer(string url, string outputHtml) | |
| { | |
| return Task.Run(() => | |
| { | |
| HttpListener listener = new HttpListener(); | |
| listener.Prefixes.Add(url); | |
| listener.Start(); | |
| // GetContext method blocks while waiting for a request. | |
| HttpListenerContext context = listener.GetContext(); |