Error 405 (HTTP method GET is not supported by this URL)
-
27-10-2019 - |
Pergunta
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");
}
Solução
You specified 'jsonp' as your 'dataType'. That will cause the method to be 'GET', overriding your 'type' settings.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow