Class: Crawlr::HTTPInterface::Response

Inherits:
Struct
  • Object
show all
Defined in:
lib/crawlr/http_interface.rb

Overview

Simplified HTTP response structure for internal use

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Attribute Details

#bodyString? (readonly)

Returns Response body content.

Returns:

  • (String, nil)

    Response body content



62
# File 'lib/crawlr/http_interface.rb', line 62

Response = Struct.new(:url, :status, :headers, :version, :body)

#headersHash (readonly)

Returns HTTP response headers.

Returns:

  • (Hash)

    HTTP response headers



62
# File 'lib/crawlr/http_interface.rb', line 62

Response = Struct.new(:url, :status, :headers, :version, :body)

#statusInteger (readonly)

Returns HTTP status code.

Returns:

  • (Integer)

    HTTP status code



62
# File 'lib/crawlr/http_interface.rb', line 62

Response = Struct.new(:url, :status, :headers, :version, :body)

#urlString (readonly)

Returns The requested URL.

Returns:

  • (String)

    The requested URL



62
# File 'lib/crawlr/http_interface.rb', line 62

Response = Struct.new(:url, :status, :headers, :version, :body)

#versionString (readonly)

Returns HTTP protocol version.

Returns:

  • (String)

    HTTP protocol version



62
# File 'lib/crawlr/http_interface.rb', line 62

Response = Struct.new(:url, :status, :headers, :version, :body)