Class: Net::HTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/appfog-vmc-plugin/net_http.rb

Constant Summary collapse

HTTP_TIMEOUT =
ENV['TIMEOUT'] ? ENV['TIMEOUT'].to_i : 10*60

Instance Method Summary collapse

Instance Method Details

#_request_Object

def HTTP.new(address, port = nil, p_addr = nil, p_port = nil, p_user = nil, p_pass = nil)

Proxy(p_addr, p_port, p_user, p_pass).newobj(address, port)

end



16
# File 'lib/appfog-vmc-plugin/net_http.rb', line 16

alias _request_ request

#request(req, body = nil, &block) ⇒ Object



17
18
19
20
# File 'lib/appfog-vmc-plugin/net_http.rb', line 17

def request(req, body=nil, &block)
  @socket.read_timeout = HTTP_TIMEOUT unless @socket.nil?
  return _request_(req, body, &block)
end