);
$shown = false;
- if ($res->getHeader('content-type') == 'application/json') {
+ if (Util::getMimeType($res) == 'application/json') {
$errData = json_decode($res->getBody());
if (!isset($errData->error)) {
Log::err('Error response does not contain "error" property');
{
if ($isHtml) {
$this->addProperty(
- 'content', ['html' => $text]
+ 'content', [['html' => $text]]
);
} else {
$this->addProperty('content', $text);