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



499
500
501
502
503
504
505
506
# File 'lib/mechanize/test_case.rb', line 499

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