Sha256: 67a00c78725c99d64a9fb5cbc2d136a306c7d1e1259a8dd245b96fcac1afb085

Contents?: true

Size: 270 Bytes

Versions: 18

Compression:

Stored size: 270 Bytes

Contents

module Sapience
  module Extensions
    module Grape
      module RequestFormatHelper
        def request_format(env)
          content_type = env["CONTENT_TYPE"] || env["CONTENT-TYPE"]
          content_type.to_s.split("/").last
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sapience-2.4.0 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.3.5 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.3.4 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.3.3 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.2.3 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.2.1 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.2.0 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.1.0 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.0.5 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.0.4 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.0.3 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.0.2 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.0.1 lib/sapience/extensions/grape/request_format_helper.rb
sapience-2.0.0 lib/sapience/extensions/grape/request_format_helper.rb
sapience-1.0.15 lib/sapience/extensions/grape/request_format_helper.rb
sapience-1.0.14 lib/sapience/extensions/grape/request_format_helper.rb
sapience-1.0.13 lib/sapience/extensions/grape/request_format_helper.rb
sapience-1.0.12 lib/sapience/extensions/grape/request_format_helper.rb