Module: Grape::ContentTypes

Defined in:
lib/grape/util/content_types.rb

Constant Summary collapse

CONTENT_TYPES =

Content types are listed in order of preference.

ActiveSupport::OrderedHash[
  :xml,  'application/xml',
  :serializable_hash, 'application/json',
  :json, 'application/json',
  :atom, 'application/atom+xml',
  :rss,  'application/rss+xml',
  :txt,  'text/plain',
]

Class Method Summary collapse

Class Method Details

.content_types_for(from_settings) ⇒ Object



13
14
15
# File 'lib/grape/util/content_types.rb', line 13

def self.content_types_for(from_settings)
  from_settings || Grape::ContentTypes::CONTENT_TYPES
end