module Roda::RodaPlugins::Cookies

The cookies plugin adds response methods for handling cookies. Currently, you can set cookies with set_cookie and delete cookies with delete_cookie:

response.set_cookie('foo', 'bar')
response.delete_cookie('foo')

Pass a hash of cookie options when loading the plugin to set some defaults for all cookies upon setting and deleting. This is particularly useful for configuring the domain and path of all cookies.

plugin :cookies, domain: 'example.com', path: '/api'