class Typhoeus::Response

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/typhoeus/response.rbs

class Typhoeus::Response
  def initialize: (?Hash options) -> void
  def mock: () -> nil
end

This class represents the response.

def handled_response

Returns:
  • (Object) - The result of callbacks
def handled_response
  @handled_response || self
end

def initialize(options = {})

Experimental RBS support (using type sampling data from the type_fusion project).

def initialize: (?(httpauth_avail | Integer | total_time | Float | starttransfer_time | Float | appconnect_time | Float | pretransfer_time | Float | connect_time | Float | namelookup_time | Float | redirect_time | Float | effective_url | String | primary_ip | String | response_code | Integer | request_size | Integer | redirect_count | Integer | redirect_url | NilClass | size_upload | Float | size_download | Float | speed_upload | Float | speed_download | Float | return_code | Symbol | response_headers | String | response_body | String | debug_info | Ethon::Easy::DebugInfo | httpauth_avail | Integer | total_time | Float | starttransfer_time | Float | appconnect_time | Float | pretransfer_time | Float | connect_time | Float | namelookup_time | Float | redirect_time | Float | effective_url | String | primary_ip | String | response_code | Integer | request_size | Integer | redirect_count | Integer | redirect_url | NilClass | size_upload | Float | size_download | Float | speed_upload | Float | speed_download | Float | return_code | NilClass | response_headers | String | response_body | String | debug_info | Ethon::Easy::DebugInfo) options) -> void

This signature was generated using 88 samples from 3 applications.

Returns:
  • (Response) - The new response.

Parameters:
  • options (Hash) -- The options hash.

Other tags:
    Example: Create a response. -
def initialize(options = {})
  @options = options
  @headers = Header.new(options[:headers]) if options[:headers]
end

def mock

Experimental RBS support (using type sampling data from the type_fusion project).

def mock: () -> nil

This signature was generated using 74 samples from 3 applications.

Other tags:
    Api: - private
def mock
  defined?(@mock) ? @mock : options[:mock]
end