From 521b64186627574b848b0a1484eaa6b4fa5606e4 Mon Sep 17 00:00:00 2001 From: mav-rik Date: Sat, 2 Oct 2021 19:47:31 +0200 Subject: [PATCH] docs(readme): fix the 'download' method examples (#237) --- 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 }) }) ```