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

Breadcrumb

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

function IsJsonRequestMatcher::matches

Overrides RequestMatcherInterface::matches

File

vendor/symfony/http-foundation/RequestMatcher/IsJsonRequestMatcher.php, line 24

Class

IsJsonRequestMatcher
Checks the Request content is valid JSON.

Namespace

Symfony\Component\HttpFoundation\RequestMatcher

Code

public function matches(Request $request) : bool {
    return json_validate($request->getContent());
}

API Navigation

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