Call PHP rest webservice from ajax MVC asp.net? -
i trying call php rest webservice mvc ajax after calling it not going call success dont missing here.
webservice required 2 paramaters code
$.ajax({ type: "post", url: "https://test.com/custom/", datatype: "json", contenttype: "application/json", data: { "releaseversion": "xxx", "releasetype":"xxx" }, success: function (data) { alert("webservice called successfully"); } }) it tried using json.stringfy while passing parameters wont work. how solve this. environment: visual studio 2013 , mvc 4.0.
set datatype in ajax call jsonp calling cross domain webservice.
in php webservice code have add header before passing json.
as header content type=application/json, , json php webservice in ajax call.
Comments
Post a Comment