title: CakePHP: Unsetting request (post) data in the AppController beforeFilter
body: <p>I'm posting a specific value through a POST form to my CakePHP app. Within the AppController I handle this specific POST data and afterwards I unset $this->request->data, e.g.</p>
  
  <pre><code>    if(!empty($this-&gt;request-&gt;data['Keyboard'])) {
          $this-&gt;Session-&gt;write('Keyboard.active', $this-&gt;request-&gt;data['Keyboard']['active']);
          unset($this-&gt;request-&gt;data);
      }
  </code></pre>
  
  <p>Afterwards I want ALL request data to be unset (hence the <code>$this-&gt;request-&gt;data</code>). Within my child controllers I call <code>parent::beforefilter();</code> as the first line of code in its respective <code>beforeFilter</code> function, making sure the <code>beforeFilter</code> of my <code>appController</code> is initiated. However, in my childController the following line of code will still evaluate to true:</p>
  
  <pre><code>if($this-request-&gt;is('post'))
  </code></pre>
  
  <p>How do I 'unset' the is('post') call? I've also tried <code>$this-&gt;request-&gt;is('post') = false</code> in the <code>if-statement</code> above, with no success however.</p>