Jquery ajax method request body is null but postman is working normal
<p>I am configuring a service on Mule ESB to feed the interface that i've been working on with jQuery and jQuery UI.</p>

<p>Mule ESB contains a http listener whose method is "POST" to get request body and evaluate it then give necessary response.</p>

<p>Here is my request that i am sending via POSTMAN :</p>

<pre><code>var settings = {
  "async": true,
  "crossDomain": true,
  "url": "http://localhost:8081/feed",
  "method": "POST",
  "headers": {
    "content-type": "application/json",
    "cache-control": "no-cache",
  },
  "processData": false,
  "data": "{\r\n\t\"vibs\": [\r\n\t\t\"TAS2002\"\r\n\t],\r\n\t\"language\": \"de-DE\"\r\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
</code></pre>

<p>Mule ESB and web application runs in different web hosts(web server for Mule, node http-server for web-app) and i know that this is effecting to cross domain policy... But i don't know how i should configure my service to handle this request.</p>

<p>Mule always get the request with null body, because normally when i was sending same request via POSTMAN, postman transfers request's body into [#message.payload] object.</p>

<p>When i am trying with jQuery ajax or javascript XHR etc. , on debugger it shows that request payload is null. So i can't evaluate request body...</p>

<p>Could anyone help me about how to solve the issue ?</p>

<p>By the way i am using Mule ESB 3.7.0 for server runtime, and jQuery 1.10.2 to use ajax.</p>

<p>Any help would be appreciated, many thanks in advance!</p>