Class: HeaderServlet
- Inherits:
-
WEBrick::HTTPServlet::AbstractServlet
- Object
- WEBrick::HTTPServlet::AbstractServlet
- HeaderServlet
- Defined in:
- lib/mechanize/test_case/header_servlet.rb
Instance Method Summary collapse
Instance Method Details
#do_GET(req, res) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/mechanize/test_case/header_servlet.rb', line 3 def do_GET(req, res) res.content_type = "text/plain" req.query.each do |x,y| res[x] = y end req.each do |k, v| res.body << "#{k}|#{v}\n" end end |