Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RequestDataCollector.php

function RequestDataCollector::isJsonRequest

File

vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php, line 275

Class

RequestDataCollector
@author Fabien Potencier <fabien@symfony.com>

Namespace

Symfony\Component\HttpKernel\DataCollector

Code

public function isJsonRequest() : bool {
    return 1 === preg_match('{^application/(?:\\w+\\++)*json$}i', $this->data['request_headers']['content-type']);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal