From 88292ba5818af7f982050b6904ba92914ee127fb Mon Sep 17 00:00:00 2001 From: mav-rik Date: Sat, 2 Oct 2021 14:26:28 +0200 Subject: [PATCH] docs(readme): fix the 'download' method examples --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc99b02..e8f7d1d 100644 --- a/README.md +++ b/README.md @@ -71,11 +71,11 @@ fastify.get('/another/path', function (req, reply) { }) fastify.get('/path/without/cache/control', function (req, reply) { - return reply.sendFile('myHtml.html', { cacheControl: false }) // serving a file disabling cache-control headers + return reply.download('myHtml.html', { cacheControl: false }) // serving a file disabling cache-control headers }) fastify.get('/path/without/cache/control', function (req, reply) { - return reply.sendFile('myHtml.html', 'custom-filename.html', { cacheControl: false }) + return reply.download('myHtml.html', 'custom-filename.html', { cacheControl: false }) }) ```