dojo / request / xhr post返回404 not found错误

时间:2016-08-11 16:44:53

标签: post dojo xmlhttprequest http-status-code-404

我正在使用dojo / request.xhr将一些内容保存到我的Web应用程序中存储的.json文件中。请看下面的代码片段。当我运行它时," POST http://.../storage/file1.json?key2=value2 404(未找到)"出现了。文件路径是正确的。可能有什么不对?请帮忙!



onWriteBtnClicked(){
		xhr('./storage/file1.json', 
		{
			method: "POST",
			query: {
				key1: "AL",
				key2: "TX"
			},
			handleAs: "json"
		}).then(function(data){
			console.log(data);
		});
}




0 个答案:

没有答案
相关问题