def get_database(options=nil) #:nodoc:
      raise ArgumentError, 'options have to be a Hash' if !options.nil? and !options.kind_of? Hash

      if options.nil?
        # use database from connect
        raise ConnectionError, 'client has to be connected if no params' unless connected?
        options = { :database => database }
      end

      options_pattern = { :database => :mandatory, :user => :optional, :password => :optional }
      verify_options(options, options_pattern)

      params = {:method => :get, :uri => "database/#{options[:database]}"}
      params[:no_session] = true # out of existing session which represents an already done authentication

      # additional authentication allowed, overriden in 'call_server' if not defined
      params[:user] = options[:user] if options.include? :user
      params[:password] = options[:password] if options.include? :password

      response = call_server params

      # NotFoundError cannot be raised - no way how to recognize from 401 bad auth
      rslt = process_response response
      decorate_classes_with_model(rslt['classes']) unless rslt['classes'].nil?
      rslt
    end
def get_database(options=nil) #:nodoc:
      raise ArgumentError, 'options have to be a Hash' if !options.nil? and !options.kind_of? Hash

      if options.nil?
        # use database from connect
        raise ConnectionError, 'client has to be connected if no params' unless connected?
        options = { :database => database }
      end

      options_pattern = { :database => :mandatory, :user => :optional, :password => :optional }
      verify_options(options, options_pattern)

      params = {:method => :get, :uri => "database/#{options[:database]}"}
      params[:no_session] = true # out of existing session which represents an already done authentication

      # additional authentication allowed, overriden in 'call_server' if not defined
      params[:user] = options[:user] if options.include? :user
      params[:password] = options[:password] if options.include? :password

      response = call_server params

      # NotFoundError cannot be raised - no way how to recognize from 401 bad auth
      rslt = process_response response
      decorate_classes_with_model(rslt['classes']) unless rslt['classes'].nil?
      rslt
    end
> curl --user admin:admin http://localhost:2480/database/temp