I have a WCF service waiting for POST. Using Fiddler, I found that in cross-domain situations, my POST request changed to GET, resulting in a 405 error from the server.
$.ajax({
type: "POST",
url: "http://blah/blah.svc/Test",
data: JSON.stringify("{ 'WebUserID': 4 }"),
dataType: "jsonp",
contentType: "application/json; charset=utf-8",
success: function (data, status, xhr) {
alert("success--");
}
});
Can anyone shed some light on this?
thank
source
share