HTTP数据请求

ajax网络请求,支持POST和GET
牛刀小试
GET请求获取数据
POST请求提交
请求超时模拟(访问google)
示例代码
app.ajax({
	url:"http://api.k780.com:88",
	method:"POST",
	data:{
		app:'weather.today',
		weaid:1, //查看北京的天气
		appkey:12705,
		sign:'c7138fd36d52d9b7ea888430ca764051',
		format:'json'
	},
	timeout:5000,
	success:function(result){
		//app.alert(result);
		$("#result_ajax").text(result.returnValue);
	},
	fail:function(error){
		app.alert(error);
	}
});