I have several services - with clean URLs
and each service call checks the URL pattern.
Now I am calling these URLs through AJAX from another server using the JSONP technique.
But when called, the callback and _(timestamp) parameters with the service URLs are automatically added.
The timestamp is removed by adding cache : true . But can not remove the callback parameter.
here is my AJAX call code -
$.ajax({ type: 'GET', url : "http://test.com/test/services/getFollowMeHistory/1/1/50", dataType:'jsonp', cache : true, crossDomain : true, //jsonpCallback : false, error : function(XMLHttpRequest, textStatus, errorThrown) { alert("Error occured while loading Loads."+textStatus); } }); });
Its calling the URL as- http://test.com/test/services/getFollowMeHistory/1/1/50?callback=false and I get 404 from the service side.
My service returns data as callbackMethod ({..JSON RESPONSE ...}) . This way it will automatically call function callbackMethod(data) in my script. I do not need this callback parameter in my url.
Just need to remove the ?callback=... from the URL
Help Plz.
jquery jsonp ajax
Avi c
source share