gpt4 book ai didi

javascript - jquery ajax http 405或500错误

转载 作者:行者123 更新时间:2023-11-28 20:28:45 26 4
gpt4 key购买 nike

我有一个使用.asmx的网络服务,当我尝试使用jquery Ajax访问时,它给我带来了http 405的问题,有时500是网络客户端问题的服务问题请举例指导

$j.ajax({
type: "POST",
//url :'http://Service1.asmx/HelloWorld',
url :webServiceUrl,
cache:false,
async: false,
data: soap xml data,
dataType :"xml",

error:function ()
{
alert("error");
},
contentType:"text/xml; charset=\"utf-8\"",
}).done(function(response){
console.log(response);
alert("Yahoo ");

});

});

最佳答案

显然这是一个网络服务器问题。

如果出现错误 500,则意味着服务器面临某种内部问题。

如果是 405,则意味着 Web 服务不允许这种方法。在您的情况下,您尝试使用 POST 并且服务器可能只支持 GET 请求。

关于javascript - jquery ajax http 405或500错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16837361/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com