public static function setJSON() { static::Init(); //Debug::log('Response::setJson()'); self::$autoHeaders = false; self::setHeader(Response::HEADER_CONTENT_TYPE, Mimes::getType('json') . '; charset=utf-8'); }
public function detectType() { $result = false; if ($this->isOk()) { $this->type = Mimes::getType($this->extension); $result = $this->type; } return $result; }