Method: Calabash::Android::Operations::Device#configure_http

Defined in:
lib/calabash-android/operations.rb

#configure_http(http, options) ⇒ Object



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/calabash-android/operations.rb', line 449

def configure_http(http, options)
  return unless http
  http.connect_timeout = options[:open_timeout] || 15
  http.send_timeout = options[:send_timeout] || 15
  http.receive_timeout = options[:read_timeout] || 15
  if options.has_key?(:debug) && options[:debug]
    http.debug_dev= $stdout
  else
    if ENV['DEBUG_HTTP'] and (ENV['DEBUG_HTTP'] != '0')
      http.debug_dev = $stdout
    else
      http.debug_dev= nil
    end
  end
  http
end