Class: Algolia::Http::Response
- Inherits:
 - 
      Object
      
        
- Object
 - Algolia::Http::Response
 
 
- Defined in:
 - lib/algolia/transport/http/response.rb
 
Instance Attribute Summary collapse
- 
  
    
      #body  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute body.
 - 
  
    
      #connect_timeout  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
used for the echo requester.
 - 
  
    
      #error  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute error.
 - 
  
    
      #has_timed_out  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute has_timed_out.
 - 
  
    
      #headers  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute headers.
 - 
  
    
      #host  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
used for the echo requester.
 - 
  
    
      #method  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
used for the echo requester.
 - 
  
    
      #network_failure  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute network_failure.
 - 
  
    
      #path  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
used for the echo requester.
 - 
  
    
      #query_params  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
used for the echo requester.
 - 
  
    
      #status  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute status.
 - 
  
    
      #timeout  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
used for the echo requester.
 
Instance Method Summary collapse
- 
  
    
      #initialize(opts = {})  ⇒ Response 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Response.
 
Constructor Details
#initialize(opts = {}) ⇒ Response
Returns a new instance of Response.
      16 17 18 19 20 21 22 23 24 25 26 27 28 29 30  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 16 def initialize(opts = {}) @status = opts[:status] @body = opts[:body] @error = opts[:error] || "" @headers = opts[:headers] || "" @has_timed_out = opts[:has_timed_out] || false @network_failure = opts[:network_failure] || false @method = opts[:method] || "" @path = opts[:path] || "" @host = opts[:host] || "" @timeout = opts[:timeout] || 0 @connect_timeout = opts[:connect_timeout] || 0 @query_params = opts[:query_params] || {} end  | 
  
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
      4 5 6  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 4 def body @body end  | 
  
#connect_timeout ⇒ Object (readonly)
used for the echo requester
      7 8 9  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 7 def connect_timeout @connect_timeout end  | 
  
#error ⇒ Object (readonly)
Returns the value of attribute error.
      4 5 6  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 4 def error @error end  | 
  
#has_timed_out ⇒ Object (readonly)
Returns the value of attribute has_timed_out.
      4 5 6  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 4 def has_timed_out @has_timed_out end  | 
  
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
      4 5 6  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 4 def headers @headers end  | 
  
#host ⇒ Object (readonly)
used for the echo requester
      7 8 9  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 7 def host @host end  | 
  
#method ⇒ Object (readonly)
used for the echo requester
      7 8 9  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 7 def method @method end  | 
  
#network_failure ⇒ Object (readonly)
Returns the value of attribute network_failure.
      4 5 6  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 4 def network_failure @network_failure end  | 
  
#path ⇒ Object (readonly)
used for the echo requester
      7 8 9  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 7 def path @path end  | 
  
#query_params ⇒ Object (readonly)
used for the echo requester
      7 8 9  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 7 def query_params @query_params end  | 
  
#status ⇒ Object (readonly)
Returns the value of attribute status.
      4 5 6  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 4 def status @status end  | 
  
#timeout ⇒ Object (readonly)
used for the echo requester
      7 8 9  | 
    
      # File 'lib/algolia/transport/http/response.rb', line 7 def timeout @timeout end  |