Class: Typhoeus::Response
- Inherits:
-
Object
- Object
- Typhoeus::Response
- Includes:
- Cacheable, Informations, Status
- Defined in:
- lib/typhoeus/response.rb,
lib/typhoeus/response/header.rb,
lib/typhoeus/response/status.rb,
lib/typhoeus/response/cacheable.rb,
lib/typhoeus/response/informations.rb
Overview
This class represents the response.
Defined Under Namespace
Modules: Cacheable, Informations, Status Classes: Header
Instance Attribute Summary collapse
-
#handled_response ⇒ Object
Returns the handled_response if it has been defined; otherwise, returns the response.
-
#mock ⇒ Object
(also: #mock?)
private
Returns whether this request is mocked or not.
-
#options ⇒ Hash
The provided options, which contain all the informations about the request.
-
#request ⇒ Typhoeus::Request
Remembers the corresponding request.
Attributes included from Cacheable
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Response
constructor
Create a new response.
Methods included from Cacheable
Methods included from Status
#failure?, #http_version, #modified?, #status_message, #success?, #timed_out?
Methods included from Informations
#appconnect_time, #connect_time, #debug_info, #effective_url, #headers, #httpauth_avail, #namelookup_time, #pretransfer_time, #primary_ip, #redirect_count, #redirect_time, #redirect_url, #redirections, #request_size, #response_body, #response_code, #response_headers, #return_code, #return_message, #size_download, #size_upload, #speed_download, #speed_upload, #starttransfer_time, #total_time
Constructor Details
Instance Attribute Details
#handled_response ⇒ Object
Returns the handled_response if it has been defined; otherwise, returns the response
64 65 66 |
# File 'lib/typhoeus/response.rb', line 64 def handled_response @handled_response || self end |
#mock ⇒ Object Also known as: mock?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns whether this request is mocked or not.
54 55 56 |
# File 'lib/typhoeus/response.rb', line 54 def mock defined?(@mock) ? @mock : [:mock] end |
#options ⇒ Hash
The provided options, which contain all the informations about the request.
29 30 31 |
# File 'lib/typhoeus/response.rb', line 29 def @options end |
#request ⇒ Typhoeus::Request
Remembers the corresponding request.
23 24 25 |
# File 'lib/typhoeus/response.rb', line 23 def request @request end |