class RorVsWild::Client

def new_http

def new_http
  uri = URI(api_url)
  http = Net::HTTP.new(uri.host, uri.port)
  http.open_timeout = timeout
  http.keep_alive_timeout = 5
  if uri.scheme == HTTPS
    # Disable peer verification while there is a memory leak with OpenSSL
    # http.verify_mode = OpenSSL::SSL::VERIFY_PEER
    # http.ca_file = CERTIFICATE_AUTHORITIES_PATH
    http.use_ssl = true
  end
  http
end