Class: SendCookiesServlet

Inherits:
WEBrick::HTTPServlet::AbstractServlet
  • Object
show all
Defined in:
lib/mechanize/test_case.rb

Instance Method Summary collapse

Instance Method Details

#do_GET(req, res) ⇒ Object



489
490
491
492
493
494
495
496
# File 'lib/mechanize/test_case.rb', line 489

def do_GET(req, res)
  res['Content-Type'] = "text/html"
  res.body = "<html><body>"
  req.cookies.each { |c|
    res.body << "<a href=\"#\">#{c.name}:#{c.value}</a>"
  }
  res.body << "</body></html>"
end