Skip to content

Commit

Permalink
[ci-skip] Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed Feb 27, 2019
1 parent aa2ed8c commit 0b211c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
A plugin for [Fastify](http://fastify.io/) that adds support for reading and
setting cookies.

This plugin's cookie parsing works via Fastify's `preHandler` hook. Therefore,
you should register it prior to any other `preHandler` hooks that will depend
This plugin's cookie parsing works via Fastify's `onRequest` hook. Therefore,
you should register it prior to any other `onRequest` hooks that will depend
upon this plugin's actions.

## Example
Expand All @@ -33,7 +33,7 @@ fastify.get('/', (req, reply) => {

### Parsing

Cookies are parsed in the `preHandler` Fastify hook and attached to the request
Cookies are parsed in the `onRequest` Fastify hook and attached to the request
as an object named `cookies`. Thus, if a request contains the header
`Cookie: foo=foo` then, within your handler, `req.cookies.foo` would equal
`'foo'`.
Expand Down

0 comments on commit 0b211c9

Please sign in to comment.