Sha256: ba02c9d14ff44152fa3a3891836ee69725963c5faf3300c2125132d2b72358c5

Contents?: true

Size: 521 Bytes

Versions: 5

Compression:

Stored size: 521 Bytes

Contents

module Grape
  module ContentTypes
    # Content types are listed in order of preference.
    CONTENT_TYPES = ActiveSupport::OrderedHash[
      :xml,  'application/xml',
      :serializable_hash, 'application/json',
      :json, 'application/json',
      :jsonapi, 'application/vnd.api+json',
      :atom, 'application/atom+xml',
      :rss,  'application/rss+xml',
      :txt,  'text/plain',
   ]

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
grape-security-0.8.0 lib/grape/util/content_types.rb
grape-0.9.0 lib/grape/util/content_types.rb
grape-0.8.0 lib/grape/util/content_types.rb
grape-0.7.0 lib/grape/util/content_types.rb
grape-0.6.1 lib/grape/util/content_types.rb