Method: Crea::RPC::HttpClient#http

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

#httpObject



30
31
32
33
34
35
36
37
38
39
# File 'lib/crea/rpc/http_client.rb', line 30

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