Error 405 (HTTP method GET is not supported by this URL)
-
27-10-2019 - |
سؤال
I am facing this issue 405 (HTTP method GET is not supported by this URL)
whereas the method is post in my code
$.ajax({
url: myUrl + "?" + "token=" + AccessToken + "&key=" +dev_key,
jsonp: 'callback',
dataType: 'jsonp',
type: 'post',
data: sendXML,
success: function (result) {
alert("hjgh");
}
});
function callback(json)
{
alert("ghj");
}
المحلول
You specified 'jsonp' as your 'dataType'. That will cause the method to be 'GET', overriding your 'type' settings.
لا تنتمي إلى StackOverflow