Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ContentTypeProcessor.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
12 
17 {
24  public function processHeaderValue(string $headerValue) : void
25  {
26  if (!$headerValue || strpos($headerValue, 'application/json') === false) {
27  throw new LocalizedException(
28  new \Magento\Framework\Phrase('Request content type must be application/json')
29  );
30  }
31  }
32 }