def json_content_type?(env)
      if env.include?(CONTENT_TYPE_KEY)
        env[CONTENT_TYPE_KEY].downcase == CONTENT_TYPE_JSON.downcase
      elsif env.include?(CONTENT_TYPE_ALT_KEY)
        env[CONTENT_TYPE_ALT_KEY].downcase == CONTENT_TYPE_JSON.downcase
      else
        false
      end
    end
def json_content_type?(env)
      if env.include?(CONTENT_TYPE_KEY)
        env[CONTENT_TYPE_KEY].downcase == CONTENT_TYPE_JSON.downcase
      elsif env.include?(CONTENT_TYPE_ALT_KEY)
        env[CONTENT_TYPE_ALT_KEY].downcase == CONTENT_TYPE_JSON.downcase
      else
        false
      end
    end
Determine whether or not the 'Content-Type' is 'application/json'.
 The content type value assertion is always case insensitive and supports
 both a dash/hyphen and an underscore. The content type key assertion
 depends on the env parameter. A Hash is case sensitive by default whereas
 a Rack::Utils::HeaderHash is case insensitive.