Class: ContentTypeServlet

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

Instance Method Summary collapse

Instance Method Details

#do_GET(req, res) ⇒ Object



3
4
5
6
7
# File 'lib/mechanize/test_case/content_type_servlet.rb', line 3

def do_GET(req, res)
  ct = req.query['ct'] || "text/html; charset=utf-8"
  res['Content-Type'] = ct
  res.body = "Hello World"
end