title: Extjs to call a RESTful webservice
body: <p>I am trying to make a RESTful webservice call using Extjs. Below is the code i am using:</p>
  
  <pre><code>Ext.Ajax.request({ url: incomingURL ,
     method: 'POST',
     params: {param1:p1, param2:p2},
     success: function(responseObject){
       var obj = Ext.decode(responseObject.responseText);
       alert(obj);
     },
     failure: function(responseObject){
       var obj = Ext.decode(responseObject.responseText);
       alert(obj);
     }
  });
  </code></pre>
  
  <p>but it does not work, the request is sent using OPTIONS method instead of POST.</p>
  
  <p>I also tried to do the same thing using below code but result is the same:</p>
  
  <pre><code>var conn = new Ext.data.Connection();
  conn.request({
    url: incomingURL,
    method: 'POST',
    params: {param1:p1, param2:p2},
    success: function(responseObject) 
    {
      Ext.Msg.alert('Status', 'success');
    },
    failure: function(responseObject) 
    {
      Ext.Msg.alert('Status', 'Failure');
    }
  });
  </code></pre>
  
  <p>But when i tried to do the same thing using basic ajax call ( using the browser objects directly i.e. XMLHttpRequest() or ActiveXObject("Microsoft.XMLHTTP")) it works fine and i get the response as expected.</p>
  
  <p>Can anyone please help me, as i am not able to understand what i am doing wrong with extjs ajax call? </p>