class Mechanize::RedirectNotGetOrHeadError

Raised when a POST, PUT, or DELETE request results in a redirect see RFC 2616 10.3.2, 10.3.3 www.ietf.org/rfc/rfc2616.txt

Attributes

page[R]
response_code[R]
uri[R]
verb[R]

Public Class Methods

new(page, verb) click to toggle source
# File lib/mechanize/redirect_not_get_or_head_error.rb, line 7
def initialize(page, verb)
  @page           = page
  @verb           = verb
  @uri            = page.uri
  @response_code  = page.code
end

Public Instance Methods

inspect()
Alias for: to_s
to_s() click to toggle source
# File lib/mechanize/redirect_not_get_or_head_error.rb, line 14
def to_s
  method = @verb.to_s.upcase
  "#{@response_code} redirect received after a #{method} request"
end
Also aliased as: inspect