Sha256: 22291ba36320960bb59390d0659f875090559b716eca669eceae0d65392f0f5a
Contents?: true
Size: 524 Bytes
Versions: 123
Compression:
Stored size: 524 Bytes
Contents
require 'action_dispatch' module Acfs class Response # Quick accessors for format handling. module Formats def content_type @content_type ||= read_content_type end def json? content_type == Mime::JSON end private def read_content_type return 'text/plain' unless headers && headers['Content-Type'] content_type = headers['Content-Type'].split(/;\s*\w+="?\w+"?/).first Mime::Type.parse(content_type).first end end end end
Version data entries
123 entries across 123 versions & 1 rubygems