title: Cant get jQuery ajax POST to work
body: <p>If I set type to 'GET' in the code below it works, but I cant get it to work with 'POST'.</p>
  
  <p>ajaxPostTest.html...</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  $(document).ready(function(){
  
      $.ajax({
          url: "ajaxPostTest_server.php",
          data: {"fruit1": "rasp", "fruit2": "bramble"},
          type: 'POST',
          dataType: 'json',
          contentType: "application/json; charset=utf-8",
          success: function(data){
              $("#returned").append(data.fruit1);
              },
          error: function(jqXHR, textStatus, errorThrown){
               alert("error") ;
              }
          });
  });
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="returned"&gt;returned: &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>ajaxPostTest_server.php...</p>
  
  <pre><code>&lt;?php
      echo json_encode($_REQUEST);
  ?&gt;
  </code></pre>
  
  <p>The expected output on the browser is...</p>
  
  <pre><code>returned: rasp
  </code></pre>
  
  <p>I'm actually attempting to interact with an ASP.NET web server and I want to confirm my ajax is working (and I understand ajax properly) first - hence this simplified code.</p>
  
  <p>Firebug debugging...</p>
  
  <pre><code>Response Headersview source
  Date    Fri, 23 Sep 2011 14:57:37 GMT
  Server  Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
  X-Powered-By    PHP/5.3.1
  Keep-Alive  timeout=5, max=99
  Connection  Keep-Alive
  Transfer-Encoding   chunked
  Content-Type    text/html
  Request Headersview source
  Host    localhost
  User-Agent  Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18
  Accept  application/json, text/javascript, */*; q=0.01
  Accept-Language en-gb,en;q=0.5
  Accept-Encoding gzip,deflate
  Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive  115
  Connection  keep-alive
  Content-Type    application/json; charset=utf-8
  X-Requested-With    XMLHttpRequest
  Referer http://localhost/My_Webs/temp/ajaxPostText1.html
  Content-Length  26
  Cookie  PHPSESSID=mgvoacnluh3kad5pakafrd5kd1
  </code></pre>
  
  <p>All I get in the 'response' tab is...</p>
  
  <pre><code>{"PHPSESSID":"mgvoacnluh3kad5pakafrd5kd1"}
  </code></pre>
  
  <p>I.e. I cant find where the data I send to the server is going to.</p>