server/tests/common.rb
# HTTP Accept header helper.
# Will set appropriate value for this header.
# Available options for format are: :json, :html or :xml
# By default :xml is used
#
HTTP Accept header helper.
Will set appropriate value for this header.
HTTP Accept header helper . Will set appropriate value for this header .
def accept(format=:xml)
    case format
      when :json then 'application/json;q=0.9'
      when :html then 'text/html;q=0.9'
      when :xml then 'application/xml;q=0.9'
      else 'application/xml;q=0.9'
    end
  end
def accept ( format = :xml ) case format when :json then 'application/json;q=0.9' when :html then 'text/html;q=0.9' when :xml then 'application/xml;q=0.9' else 'application/xml;q=0.9' end end
HTTP Accept header helper.
HTTP Accept header helper .
format