public function changeContentType($type)
    {

        $mime = [
            'json' => 'application/json',
            'javascript' => 'application/javascript',
            'js' => 'application/javascript',
            'ogg' => 'audio/ogg',
            'mpeg' => 'audio/mpeg',
            'html' => 'text/html',
            'plain' => 'text/plain',
            'urlencoded' => 'application/x-www-form-urlencoded'
        ];

        if (array_key_exists($type, $mime)) {
            $this->unsetHeader('Content-Type');
            $this->setHeader('Content-Type', $mime[$type]);
        }

        return $this;

    }