# File lib/openstack/connection.rb, line 187 def req(method, path, options = {}) server = options[:server] || @service_host port = options[:port] || @service_port scheme = options[:scheme] || @service_scheme headers = options[:headers] || {'content-type' => 'application/json'} data = options[:data] attempts = options[:attempts] || 0 path = @service_path + path res = csreq(method,server,path,port,scheme,headers,data,attempts) res.code.match(/^20.$/) ? (return res) : OpenStack::Exception.raise_exception(res) end