module Multiwoven::Integrations::Core::HttpHelper

def configure_http(uri, config)

def configure_http(uri, config)
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = (uri.scheme == "https")
  if config[:timeout]
    timeout_value = config[:timeout].to_f
    http.open_timeout = timeout_value
    http.read_timeout = timeout_value
  end
  http
end