Prashant_Musale Posted November 20, 2014 Share Posted November 20, 2014 i am trying to add customer via prestashop webservice . but it is giving me error as 401 unautorised. Please help me if i have missed out something in below code Note: i m just passing xml value as test just to check whether it works or not. $.ajax({ type:"POST", url: "http://127.0.0.1/ebooks/api/customers/", contenttype:"application/xml", datatype:"xml", data:{ PHP_AUTH_USER:"", ws_key:"XGX2VQ1IRLVF1H7F4Z8LTZR976PZSASDCF7R", xml:"test"}, success: function(text) { alert(getXmlAsString(text)); $("#bid1").text(text); }, error: function(xhr) { //something went wrong, handle the error and display a message alert("An error occured: " + xhr.status + " " + xhr.statusText); } }); Link to comment Share on other sites More sharing options...
atwebmaster Posted March 26, 2016 Share Posted March 26, 2016 Hi people , does anyone find a solution to this ? Thanks . Link to comment Share on other sites More sharing options...
Recommended Posts