class OneCookieServlet
Public Instance Methods
do_GET(req, res)
click to toggle source
# File lib/mechanize/test_case/one_cookie_servlet.rb, line 2 def do_GET(req, res) cookie = WEBrick::Cookie.new("foo", "bar") cookie.path = "/" cookie.expires = Time.now + 86400 res.cookies << cookie res['Content-Type'] = "text/html" res.body = "<html><body>hello</body></html>" end