Class: Typhoeus::Response
- Inherits:
-
Object
- Object
- Typhoeus::Response
- Includes:
- Informations, Status
- Defined in:
- lib/typhoeus/response.rb,
lib/typhoeus/response/header.rb,
lib/typhoeus/response/status.rb,
lib/typhoeus/response/informations.rb
Overview
This class represents the response.
Defined Under Namespace
Modules: 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
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.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Response
constructor
Create a new response.
Methods included from Status
#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, #redirections, #response_body, #response_code, #response_headers, #return_code, #return_message, #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
61 62 63 |
# File 'lib/typhoeus/response.rb', line 61 def handled_response @handled_response || self end |
#mock ⇒ Object
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.
52 53 54 |
# File 'lib/typhoeus/response.rb', line 52 def mock defined?(@mock) ? @mock : [:mock] end |
#options ⇒ Hash
The provided options, which contain all the informations about the request.
27 28 29 |
# File 'lib/typhoeus/response.rb', line 27 def @options end |
#request ⇒ Typhoeus::Request
Remembers the corresponding request.
21 22 23 |
# File 'lib/typhoeus/response.rb', line 21 def request @request end |