From fcd8e5e5ad532d48adc7cec3201d1a64257994f1 Mon Sep 17 00:00:00 2001 From: nosaevb Date: Thu, 30 Mar 2017 23:02:46 +0100 Subject: [PATCH] Typo Fix in docs/sanic/cookies.md --- docs/sanic/cookies.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sanic/cookies.md b/docs/sanic/cookies.md index 0a1042a2..e71bcc47 100644 --- a/docs/sanic/cookies.md +++ b/docs/sanic/cookies.md @@ -5,7 +5,7 @@ both read and write cookies, which are stored as key-value pairs. ## Reading cookies -A user's cookies can be accessed `Request` object's `cookie` dictionary. +A user's cookies can be accessed via the `Request` object's `cookies` dictionary. ```python from sanic.response import text @@ -42,20 +42,20 @@ from sanic.response import text @app.route("/cookie") async def test(request): response = text("Time to eat some cookies muahaha") - + # This cookie will be set to expire in 0 seconds del response.cookies['kill_me'] - + # This cookie will self destruct in 5 seconds response.cookies['short_life'] = 'Glad to be here' response.cookies['short_life']['max-age'] = 5 del response.cookies['favorite_color'] - + # This cookie will remain unchanged response.cookies['favorite_color'] = 'blue' response.cookies['favorite_color'] = 'pink' del response.cookies['favorite_color'] - + return response ```