module Roda::RodaPlugins::Cookies::ResponseMethods
def delete_cookie(key, value = {})
response.delete_cookie('foo')
Example:
override the default one used to delete the cookie.
deletes the cookie. A value hash can be provided to
Modify the headers to include a Set-Cookie value that
def delete_cookie(key, value = {}) ::Rack::Utils.delete_cookie_header!(@headers, key, roda_class.opts[:cookies_opts].merge(value)) end
def set_cookie(key, value)
response.set_cookie('foo', 'bar')
Set the cookie with the given key in the headers.
def set_cookie(key, value) value = { :value=>value } unless value.respond_to?(:keys) ::Rack::Utils.set_cookie_header!(@headers, key, roda_class.opts[:cookies_opts].merge(value)) end