title: How to do jsonp post on rails from another domain
body: <p>I want to do a POST with jsonp to rails rest service from another domain. I am using the following code in JQuery to do that. I am always getting 400 bad request.</p>
  
  <p>I am jsut specifying the type as "GET" as jsonp can only do GET. Event if I specify type as POST it will overwrite to GET. </p>
  
  <ul>
  <li>do I need to do something on rails side to allow this</li>
  <li><p>What is the other way i can do POST to rails rest api from a another domain</p>
  
  <pre><code>                $.ajax({
                          type : "GET",
                          url : "http://domain.com/movies.json",
                          contentType : "application/json; charset=utf-8",
                          data : sData,                               
                          dataType : "jsonp",                             
                          processData : false,
                           beforeSend: function(xhr)   
                        {
                        xhr.setRequestHeader("X-Http-Method-Override", "POST");
                           },
                          success : function(oJSON) {
                              console.log("in success of jsonp block")
  
                          },
                          error : function(XMLHttpRequest, status, errorThrown) {
                              console.log("in failure jsonp block")
  
  
  
                          }
                      });
  </code></pre></li>
  </ul>