Exemplo n.º 1
0
 private static async Task ReplyDocument(HttpContext http, string html, HttpStatusCode code)
 {
     MiddlewareCommon.SetStatusCode(http, code);
     MiddlewareCommon.AddHeaderTextHtml(http);
     MiddlewareCommon.AddHeaderPreventCaching(http);
     await MiddlewareCommon.WriteUtf8Buffer(http, html);
 }
Exemplo n.º 2
0
        private async Task SendLibrary(HttpContext http)
        {
#if DEBUG
            MiddlewareCommon.AddHeaderPreventCaching(http);
#else
            MiddlewareCommon.AddHeaderNeverExpires(http);
#endif
            MiddlewareCommon.AddHeaderJSON(http);
            await MiddlewareCommon.WriteBuffer(http, _library);
        }