Esempio n. 1
0
        private async Task HandleIndex(HttpListenerContext context)
        {
            var index = IndexTemplate.Render(_todos.Get());

            context.Response.ContentType = "text/html";
            context.Response.StatusCode  = 200;
            await context.Response.OutputStream.WriteAsync(index, 0, index.Length);
        }