# File lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb, line 38
  def request(resource, data='', method='GET')
    headers = {"Accept" => "application/json", "Content-Type" => "application/json"}
    if(!@auth.nil?)
      headers["Authorization"] = @auth
    end
    r = @service.send_request(method, @uri.path + resource, data, headers)
         puts r.body
    res = JSON.parse(r.body)
    res = res[res.keys[0]]

    if(res['response_type'] == "ERROR" and ( (res['error_info']['error_class'] == "PermissionException") or
                                             (res['error_info']['error_class'] == "LoginRequired") )) 
      raise Deltacloud::AuthException.new
    end
    res
  end