Mechanize::ResponseReadError

Raised when Mechanize encounters an error while reading the response body from the server. Contains the response headers and the response body up to the error along with the initial error.

Attributes

body_io[R]
error[R]
mechanize[R]
response[R]
uri[R]

Public Class Methods

new(error, response, body_io, uri, mechanize) click to toggle source

Creates a new ResponseReadError with the error raised, the response and the body_io for content read so far.

    # File lib/mechanize/response_read_error.rb, line 18
18:   def initialize error, response, body_io, uri, mechanize
19:     @body_io   = body_io
20:     @error     = error
21:     @mechanize = mechanize
22:     @response  = response
23:     @uri       = uri
24:   end

Public Instance Methods

force_parse() click to toggle source

Converts this error into a Page, File, etc. based on the content-type

    # File lib/mechanize/response_read_error.rb, line 29
29:   def force_parse
30:     @mechanize.parse @uri, @response, @body_io
31:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.