From 9d69703e234a543996f2d2966b1ec7553548222f Mon Sep 17 00:00:00 2001 From: Richard Walker Date: Thu, 14 Nov 2024 16:55:59 +1300 Subject: [PATCH] chore: set content type --- example/streaming/podlets/content.js | 2 +- example/streaming/podlets/footer.js | 2 +- example/streaming/podlets/header.js | 2 +- example/streaming/podlets/menu.js | 2 +- example/streaming/podlets/sidebar.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/streaming/podlets/content.js b/example/streaming/podlets/content.js index d07e32cd..c54d2a76 100644 --- a/example/streaming/podlets/content.js +++ b/example/streaming/podlets/content.js @@ -42,7 +42,7 @@ app.get('/css', (req, res) => { }); app.get('/', async (req, res) => { - // send headers + res.set('Content-Type', 'text/html'); res.sendHeaders(); await new Promise((res) => setTimeout(res, 2200)); diff --git a/example/streaming/podlets/footer.js b/example/streaming/podlets/footer.js index 80f73f29..3a9698e1 100644 --- a/example/streaming/podlets/footer.js +++ b/example/streaming/podlets/footer.js @@ -58,7 +58,7 @@ app.get('/css', (req, res) => { }); app.get('/', async (req, res) => { - // send headers + res.set('Content-Type', 'text/html'); res.sendHeaders(); await new Promise((res) => setTimeout(res, 100)); diff --git a/example/streaming/podlets/header.js b/example/streaming/podlets/header.js index 25a0a8df..ba14ac3e 100644 --- a/example/streaming/podlets/header.js +++ b/example/streaming/podlets/header.js @@ -74,7 +74,7 @@ app.get('/css', (req, res) => { }); app.get('/', async (req, res) => { - // send headers + res.set('Content-Type', 'text/html'); res.sendHeaders(); await new Promise((res) => setTimeout(res, 100)); diff --git a/example/streaming/podlets/menu.js b/example/streaming/podlets/menu.js index ff2c7df0..70488556 100644 --- a/example/streaming/podlets/menu.js +++ b/example/streaming/podlets/menu.js @@ -52,7 +52,7 @@ app.get('/css', (req, res) => { }); app.get('/', async (req, res) => { - // send headers + res.set('Content-Type', 'text/html'); res.sendHeaders(); // imagine this is your slow database call diff --git a/example/streaming/podlets/sidebar.js b/example/streaming/podlets/sidebar.js index bc36d2a3..568afbb8 100644 --- a/example/streaming/podlets/sidebar.js +++ b/example/streaming/podlets/sidebar.js @@ -48,7 +48,7 @@ app.get('/css', (req, res) => { }); app.get('/', async (req, res) => { - // send headers + res.set('Content-Type', 'text/html'); res.sendHeaders(); await new Promise((res) => setTimeout(res, 3200));