Browser send request to server but from simulator not send

Hell Sir,
I have add ios platform. When is use browser it send request to server. But when i use from simulation from xcode it do does send request to server.
Here is sample little programe
$scope.doSubmit = function(){
template: ‘Please Wait…’
method: ‘POST’,
url: ‘’,
params: {name:“Enamul Haque”},
// params: {cusCode:cusCode},
headers : { ‘Content-Type’: ‘application/json’ }
}).success(function(data, status, headers, config) {
//template:‘From date’
}).error(function(data, status, headers, config) {
title:‘Data :’+data+‘status :’+status+‘headers :’+headers+‘config :’+config,
//template:‘From date’

here is image from simulator

Note :It is working in adobe phonegap buld.
Please Help me…

Have you configured whitelist plugin? Have you correctly setup CORS both on mobile and server side?

Hello gmarziou

I am using java servlet. I am using it in android apps. I am using for post request and get response like that
System.out.println("response = " + request.getParameter(“name”));

       response.addHeader("Access-Control-Allow-Origin", "*");
       // response.getWriter().print(json.toString());

Thats for the server and it is usually done through a servlet filter not in servlet itself.

Client side has some work to do, search the forum.