private static void WriteFavIcon(HttpListenerContext context) { context.Response.ContentType = FlotWebApp.FavIconMimeType; context.Response.StatusCode = 200; context.Response.StatusDescription = "OK"; FlotWebApp.WriteFavIcon(context.Response.OutputStream); }
private static void WriteFlotApp(HttpListenerContext context) { context.Response.ContentType = "text/html"; context.Response.StatusCode = 200; context.Response.StatusDescription = "OK"; var app = FlotWebApp.GetFlotApp(); using (var writer = new StreamWriter(context.Response.OutputStream)) { writer.Write(app); } context.Response.Close(); }
private static void WriteFlotApp(HttpListenerContext context) { context.Response.ContentType = "text/html"; context.Response.StatusCode = 200; context.Response.StatusDescription = "OK"; var acceptsGzip = AcceptsGzip(context.Request); if (acceptsGzip) { context.Response.AddHeader("Content-Encoding", "gzip"); } FlotWebApp.WriteFlotAppAsync(context.Response.OutputStream, !acceptsGzip); }
private void WriteFavIcon(HttpListenerContext context) { context.Response.ContentType = "image/png"; FlotWebApp.WriteFavIcon(context.Response.OutputStream); context.Response.Close(); }