Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-graph-ql
Controller
HttpHeaderProcessor
ContentTypeProcessor.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\GraphQl\Controller\HttpHeaderProcessor
;
9
10
use
Magento\Framework\Exception\LocalizedException
;
11
use
Magento\GraphQl\Controller\HttpHeaderProcessorInterface
;
12
16
class
ContentTypeProcessor
implements
HttpHeaderProcessorInterface
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
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\GraphQl\Controller\HttpHeaderProcessorInterface
Definition:
HttpHeaderProcessorInterface.php:13
Magento\GraphQl\Controller\HttpHeaderProcessor\ContentTypeProcessor\processHeaderValue
processHeaderValue(string $headerValue)
Definition:
ContentTypeProcessor.php:24
Magento\GraphQl\Controller\HttpHeaderProcessor\ContentTypeProcessor
Definition:
ContentTypeProcessor.php:16
Magento
Magento\GraphQl\Controller\HttpHeaderProcessor
Definition:
ContentTypeProcessor.php:8