<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
}
switch ($type) {
+ case static::TYPE_HTML:
+ $content_type = $content_type ?? 'text/html; charset=utf-8';
+ break;
case static::TYPE_JSON:
$content_type = $content_type ?? 'application/json';
break;
// Setting the response type as an X-header for direct usage
$this->headers[static::X_HEADER] = $this->type;
- return new \GuzzleHttp\Psr7\Response($this->status, $this->headers, $this->content, $this->reason);
+ return new \GuzzleHttp\Psr7\Response($this->status, $this->headers, $this->content, '1.1', $this->reason);
}
}