Skip to content

Commit

Permalink
docs(readme): fix the 'download' method examples (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
mav-rik committed Oct 2, 2021
1 parent 905468d commit 521b641
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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 })
})

```
Expand Down

0 comments on commit 521b641

Please sign in to comment.