Nic*_*ros 5 ajax jquery http-post
我有以下ajax帖子:
$.ajax( {
type: "POST",
url: "http://192.168.7.9/api",
dataType: 'json',
data: { username: "john.doe", password: "123456", method: "search_samples" },
success: function ( data ) {
// Never get here
},
error: function ( XMLHttpRequest, textStatus, errorThrown ) {
// Always here: if async true, errorThrown has no message
// otherwise I se the NETWORK_ERR message
}
} );
Run Code Online (Sandbox Code Playgroud)
它返回此错误:NETWORK_ERR:XMLHttpRequest异常101.
我已经阅读了一些关于此错误的SO帖子,大多数建议我将async设置为true.这会删除错误消息 - 但它仍然是一个错误,我从来没有得到有效的数据.它似乎删除了没有帮助的错误消息.
在小提琴手中,在同样的开发机器上,这完美地运作 - 这是一个问题吗?原产地问题?我的语法有问题吗?
| 归档时间: |
|
| 查看次数: |
8753 次 |
| 最近记录: |