Sha256: ac1f4e23867e767fa7db5e0a6e47c674a143631d135b40bd11f0caa4c9f0991c

Contents?: true

Size: 546 Bytes

Versions: 31

Compression:

Stored size: 546 Bytes

Contents

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

class Mechanize::RedirectNotGetOrHeadError < Mechanize::Error
  attr_reader :page, :response_code, :verb, :uri
  def initialize(page, verb)
    @page           = page
    @verb           = verb
    @uri            = page.uri
    @response_code  = page.code
  end

  def to_s
    method = @verb.to_s.upcase
    "#{@response_code} redirect received after a #{method} request"
  end

  alias :inspect :to_s
end

Version data entries

31 entries across 31 versions & 5 rubygems

Version Path
mechanize-2.7.7 lib/mechanize/redirect_not_get_or_head_error.rb
husc-0.2.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/redirect_not_get_or_head_error.rb
husc-0.2.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/redirect_not_get_or_head_error.rb
husc-0.1.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/redirect_not_get_or_head_error.rb
husc-0.1.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.7.6 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.7.5 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.7.4 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.7.3 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.7.2 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.7.1 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.7.0 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.6.0 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.5.1 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.5 lib/mechanize/redirect_not_get_or_head_error.rb
mechanize-2.4 lib/mechanize/redirect_not_get_or_head_error.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/redirect_not_get_or_head_error.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/redirect_not_get_or_head_error.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/redirect_not_get_or_head_error.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/redirect_not_get_or_head_error.rb