class RedirectServlet

Public Instance Methods

do_DELETE(req, res)
Alias for: do_GET
do_GET(req, res) click to toggle source
# File lib/mechanize/test_case/redirect_servlet.rb, line 2
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'] = req['X-Location'] || '/verb'
end
Also aliased as: do_POST, do_HEAD, do_PUT, do_DELETE
do_HEAD(req, res)
Alias for: do_GET
do_POST(req, res)
Alias for: do_GET
do_PUT(req, res)
Alias for: do_GET