该代码在使用浏览器进行测试时有效。但是在我构建和安装apk时失败了。
invites = await server.invites()
invites = [invite.url for invite in invites]
invites_message = "\n".join(invites)
await fetching.edit(content=f"All Active Invites Codes: \n{invites_message}")
在我的Cordova项目中,我已经设置了:
$.ajax({
type: "POST",
async: true,
url: "http://localhost:60052/Public/Interface.asmx/Test",
data: JSON.stringify(Params),
cache: false,
contentType: "application/json; charset=utf-8",
success: function (msg) {
},
error: function (XHR, errStatus, errorThrown) {
// NETWORKERROR: 'XMLHTTPREQUEST': FAILED TO LOAD ......
}
});