Beispiel #1
0
        static void Main(string[] args)
        {
            MiniHttpServer server = new MiniHttpServer(8383);

            server.Route("^/$", "GET", IndexHandler);
            server.Route("^/index$", "POST", IndexHandler);
            server.Start();

            Console.ReadKey();

            server.Stop();

            Console.ReadKey();

            server.Start();

            Console.ReadKey();
        }
Beispiel #2
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            MiniHttpServer server = new MiniHttpServer(5, 8080);

            server.Route("/log", LogHandler);
            server.Start();

            btnStart.Enabled = false;
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            MiniHttpServer server = new MiniHttpServer(8383);

            server.Route("^/$", "GET", IndexHandler);
            server.Route("^/index$", "POST", IndexHandler);
            server.Start();

            Console.ReadKey();

            server.Stop();

            Console.ReadKey();


            server.Start();

            Console.ReadKey();
        }