When I try the following simple JSON response component (com_jsonresponse) on a Joomla 5 (Joomla! 5.0.3 / PHP 8.1.27) installation the response is rendered as expected, but the response code is 503 Service Unavaialable.
tested with postman
POST on https://<domain>/index.php?option=com_jsonresponse&format=json
Result
{
"success": true,
"message": "It worked!",
"messages": null,
"data": "hello world!"
}
Status: 503 Service Unavailable
What is wrong with this code?
Code:
<?phpdefined('_JEXEC') or die('Restricted access');use Joomla\CMS\Response\JsonResponse;echo new JsonResponse("hello world!", "It worked!");
POST on https://<domain>/index.php?option=com_jsonresponse&format=json
Result
{
"success": true,
"message": "It worked!",
"messages": null,
"data": "hello world!"
}
Status: 503 Service Unavailable
What is wrong with this code?
Statistics: Posted by digital_project — Sun Mar 24, 2024 3:59 pm