Cake\Network\Response::notModified PHP Method

notModified() public method

Sets the response as Not Modified by removing any body contents setting the status code to "304 Not Modified" and removing all conflicting headers
public notModified ( ) : void
return void
    public function notModified()
    {
        $this->statusCode(304);
        $this->body('');
        $remove = ['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'];
        foreach ($remove as $header) {
            unset($this->_headers[$header]);
        }
    }