module Typhoeus::Request::Callbacks

def execute_callbacks

Other tags:
    Api: - private

Returns:
  • (void) -

Other tags:
    Example: Execute callbacks. -
def execute_callbacks
  callbacks = Typhoeus.on_complete + on_complete
  if response && response.success?
    callbacks += Typhoeus.on_success + on_success
  elsif response
    callbacks += Typhoeus.on_failure + on_failure
  end
  callbacks.map{ |callback| callback.call(self.response) }
end