Class: Mechanize::ResponseReadError

### Home Classes Methods

### In Files

- lib/mechanize/response_read_error.rb

### Parent

Mechanize::Error

### Methods

- ::new
- #force_parse

### Files

- EXAMPLES.rdoc
- GUIDE.rdoc
- LICENSE.rdoc
- Manifest.txt
- README.rdoc

### Class/Module Index

Quicksearch

- Mechanize
- Mechanize::ChunkedTerminationError
- Mechanize::ContentTypeError
- Mechanize::Cookie
- Mechanize::CookieCMethods
- Mechanize::CookieDeprecated
- Mechanize::CookieIMethods
- Mechanize::CookieJar
- Mechanize::CookieJarIMethods
- Mechanize::DirectorySaver
- Mechanize::Download
- Mechanize::ElementMatcher
- Mechanize::Error
- Mechanize::File
- Mechanize::FileConnection
- Mechanize::FileRequest
- Mechanize::FileResponse
- Mechanize::FileSaver
- Mechanize::Form
- Mechanize::Form::Button
- Mechanize::Form::CheckBox
- Mechanize::Form::Field
- Mechanize::Form::FileUpload
- Mechanize::Form::Hidden
- Mechanize::Form::ImageButton
- Mechanize::Form::Keygen
- Mechanize::Form::MultiSelectList
- Mechanize::Form::Option
- Mechanize::Form::RadioButton
- Mechanize::Form::Reset
- Mechanize::Form::SelectList
- Mechanize::Form::Submit
- Mechanize::Form::Text
- Mechanize::Form::Textarea
- Mechanize::HTTP
- Mechanize::HTTP::Agent
- Mechanize::HTTP::AuthChallenge
- Mechanize::HTTP::AuthRealm
- Mechanize::HTTP::AuthStore
- Mechanize::HTTP::ContentDispositionParser
- Mechanize::HTTP::WWWAuthenticateParser
- Mechanize::Headers
- Mechanize::History
- Mechanize::Image
- Mechanize::Page
- Mechanize::Page::Base
- Mechanize::Page::Frame
- Mechanize::Page::Image
- Mechanize::Page::Label
- Mechanize::Page::Link
- Mechanize::Page::MetaRefresh
- Mechanize::Parser
- Mechanize::PluggableParser
- Mechanize::Prependable
- Mechanize::RedirectLimitReachedError
- Mechanize::RedirectNotGetOrHeadError
- Mechanize::ResponseCodeError
- Mechanize::ResponseReadError
- Mechanize::RobotsDisallowedError
- Mechanize::TestCase
- Mechanize::UnauthorizedError
- Mechanize::UnsupportedSchemeError
- Mechanize::Util
- Mechanize::XmlFile
- HTTP
- HTTP::CookieJar

No matching classes.

# 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
    def initialize error, response, body_io, uri, mechanize
      @body_io   = body_io
      @error     = error
      @mechanize = mechanize
      @response  = response
      @uri       = uri
    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
    def force_parse
      @mechanize.parse @uri, @response, @body_io
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.