Magento 2
How to return a JSON response from a controller
Development
controller
,
router
,
json
dmitrii_fediuk
(Dmitrii Fediuk)
March 18, 2016, 2:17pm
3
See also:
How is the «
Content-Type
» HTTP Header added to a
JSON
response?
The
\Magento\Framework\App\Response\Http::representJson()
does not specifies a
JSON
response’s charset and removes a previously specified charset, so not-latin characters are rendered incorrectly by all the modern browsers
show post in topic