Hello Guys,
I'm trying to execute the following ajax request from my SB1 application and it gives me error.
jQuery.ajax({
type: "POST",
url : "https://emwstest.globenet.hu/emedworkspraxis/api/User/Post",
beforeSend: function (xhr) {
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
xhr.setRequestHeader("Authorization", "Basic " + btoa("username:password"));
},
data: { Username:"username" },
success: function(xhr) {
// I would like to get here
},
error: function(xhr) {
// I am getting here
}
Response text is the following: \n \n \nIIS 8.5 Detailed Error - 412.0 - Precondition Failed \n \n
2 Replies
For cross domain requests use jsonp,
see this post
Hi Adel,
Thanks for the answer!
I could establish a communication with a different server using jsonp. But in my case the server side is not in my hands and it does not support jsonp. Is this the only way to make a successful call?
Thanks,
Zsolt