lib/ropenstack/common/rest.rb
def do_request(uri, request, manage_errors = true, timeout = 10)
      begin 
        http = build_http(uri, timeout)
        if(manage_errors)
          return error_manager(uri, http.request(request))
        else
          http.request(request)
          return { "Success" => true }
        end
      rescue Timeout::Error
        raise Ropenstack::TimeoutError, "It took longer than #{timeout} to connect to #{uri.to_s}"	
      rescue Errno::ECONNREFUSED
        raise Ropenstack::TimeoutError, "It took longer than #{timeout} to connect to #{uri.to_s}"	
      end	
    end
def do_request(uri, request, manage_errors = true, timeout = 10)
      begin 
        http = build_http(uri, timeout)
        if(manage_errors)
          return error_manager(uri, http.request(request))
        else
          http.request(request)
          return { "Success" => true }
        end
      rescue Timeout::Error
        raise Ropenstack::TimeoutError, "It took longer than #{timeout} to connect to #{uri.to_s}"	
      rescue Errno::ECONNREFUSED
        raise Ropenstack::TimeoutError, "It took longer than #{timeout} to connect to #{uri.to_s}"	
      end	
    end
The function which you call to perform a http request
 using the request object given in the parameters. By
 default manage errors is true, so all responses are passed
 through the error manager which converts the into Ropenstack errors.