Permalink
Browse files

edit

  • Loading branch information...
1 parent 5c25034 commit 558edc7dd041e922fe8cd5f190d568491b446759 @adamcrosby adamcrosby committed with anandology Aug 7, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 cookbook/cookies.md
View
2 cookbook/cookies.md
@@ -37,7 +37,7 @@ The third (and optional) argument to `web.setcookie()`, "expires", allows you to
####Overview
There are two methods to retrieve cookies, depending on the desired reaction to a missing cookie.
#####Way 1 (raises exception if cookie is not found):
- web.cookies().get(cookieName) # returns the value directly, but raises an exception
+ web.cookies().get(cookieName)
#cookieName is the name of the cookie submitted by the browser
#####Way 2 (avoids exception by setting default value for cookie if not found):
foo = web.cookies(cookieName=defaultValue)

0 comments on commit 558edc7

Please sign in to comment.