title: PhoneGap cross domain ajax with PhoneGap developer app and cli
body: <p>When doing ajax cross domain calls with PhoneGap developer app and CLI only GET calls and POST <strong>with no data</strong> success, POST call with data <strong>is not working</strong>. If trying local, everything is working fine.</p>
  
  <p>I did set in config.xml <code>access origin="*"</code>.
  Also did set <code>$.support.cors = true;</code> in script.</p>
  
  <p>Here is example I am doing on Hello world app from PhoneGap.</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      $(document).bind("ready", function() {
          $.support.cors = true;
          test();
      });
      &lt;/script&gt;
  
      &lt;script&gt;
      function test(){
          $.ajax({
              url:'http://www.url.com',
              type:'POST',
              headers:{
                  "Content-Type":'application/x-www-form-urlencoded'
              },
              data:'x=1',
              cache:false,
              success: function (data) {
                  alert(data);
              },
              error:function(request, textStatus, errorThrown){
                  alert(errorThrown);
              }
          });
          return false;
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>Interesting is that when looking at console, after call, call isn't shown when made, but after a while. Response time is extra long, it take more then 15sec for response, and when finally get response there is no error for ajax. However in console, I get error, <code>Proxy error: url: "entered url" ECONNRESET</code>.</p>
  
  <p>I have tried doing same request trough REST console and there is same effect.</p>
  
  <p>URL of proxy is </p>
  
  <pre><code>http://localhost:3000/proxy/
  </code></pre>
  
  <p>I haven't made any changes to proxy, and I would like to disable it if possible, but if not, just enable cross domain.</p>
  
  <p>Website to which I am doing cross domain call have enabled cross domain calls, and I have app tested in Ripple and everything is working fine. Also if I build app with PhoneGap build, everything is also working on smarthphone (iOS/iPhone).</p>
  
  <p>Note, If I am testing app with Ripple, only remote proxy works and disabled proxy, local is not working. This maybe indicates local problems but I am new to proxy and PhoneGap.</p>