title: What is the difference between http post and Redirect in CakePHP
body: <p>What is the difference between </p>
  
  <pre><code>$HttpSocket-&gt;post('http://localhost:8090/example/samplecontroller/add', $data);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>$this-&gt;redirect(array('controller'=&gt;'samplecontroller','action' =&gt; 'add', $data));
  </code></pre>
  
  <p>Both post the data ,whereas first method is not working for me.
  I used </p>
  
  <pre><code>App::uses('HttpSocket', 'Network/Http'); and
  $HttpSocket = new HttpSocket();
  </code></pre>
  
  <p>How to make it work? Or The second method is also HTTPpost?</p>
  
  <blockquote>
    <p><strong>Edited</strong></p>
  </blockquote>
  
  <pre><code> public function httppost() {
      App::uses('HttpSocket', 'Network/Http');
      $HttpSocket = new HttpSocket();
      $data = array('name' =&gt; 'test', 'type' =&gt; 'user');
      $response = $HttpSocket-&gt;post('http://localhost:8090/catv/airtime_masters/httpget', $data);
      return $response;
  }
  
   public function httpget() {
      debug($this-&gt;request-&gt;data);
      exit;
  }
  </code></pre>
  
  <p>when i run httpget() i get <code>array()</code></p>