Method: Hive::RPC::HttpClient#http

Defined in:
lib/hive/rpc/http_client.rb

#httpObject

[View source]

32
33
34
35
36
37
38
39
40
41
# File 'lib/hive/rpc/http_client.rb', line 32

def http
  @http ||= Net::HTTP.new(uri.host, uri.port).tap do |http|
    http.use_ssl = true if uri.to_s =~ /^https/i
    http.keep_alive_timeout = 150 # seconds
    
    # WARNING This method opens a serious security hole. Never use this
    # method in production code.
    # http.set_debug_output(STDOUT) if !!ENV['DEBUG']
  end
end