Class: RedirectServlet
- Inherits:
-
WEBrick::HTTPServlet::AbstractServlet
- Object
- WEBrick::HTTPServlet::AbstractServlet
- RedirectServlet
- Defined in:
- lib/mechanize/test_case.rb
Instance Method Summary collapse
- #do_GET(req, res) ⇒ Object (also: #do_POST, #do_HEAD, #do_PUT, #do_DELETE)
Instance Method Details
#do_GET(req, res) ⇒ Object Also known as: do_POST, do_HEAD, do_PUT, do_DELETE
423 424 425 426 427 |
# File 'lib/mechanize/test_case.rb', line 423 def do_GET(req, res) res['Content-Type'] = req.query['ct'] || "text/html" res.status = req.query['code'] ? req.query['code'].to_i : '302' res['Location'] = "/verb" end |