Aja.js异步JS和JSON数据请求
aja.js 主要用于异步JS文件和JSON数据的请求,不支持XML请求。
JSON 数据请求
aja() .url('/api/data.json') .on('success', function(data){ //data is a JavaScript object }) .go();
请求载入 HTML
aja() .url('/views/page.html') .into('.container') .go();
REST 客户端
aja() .method('GET') .url('/api/customer') .timeout(2500) .data({firstname: 'John Romuald'}) .on('200', function(response){ //well done }) .on('timeout', functon(){ // uh oh... Request ended. Do something fancy here, don't let your user wait forever! }) .go(); aja() .method('PUT') .url('/api/customer') .cache(false) .body({id : 12, firstname: 'John Romuald', job : 'linguist'}) .on('200', function(response){ //well done }) .on('40x', function(response){ //something is definitely wrong }) .on('500', function(response){ //oh crap }) .go();
JSON
aja() .url('http://otherdomain.com/api/remoteScript') .type('jsonp') .jsonPaddingName('callbackParameter') .jsonPadding('someGlobalFunction') .on('success', function(data){ //Fuk cross origin policy }) .go();
载入JS
aja() .url('http://platform.twitter.com/widgets.js') .type('script') .on('success', function(){ window.twttr.widgets.load(); }) .go();
评论
Asyncpy异步请求框架
Asyncpy是基于asyncio和aiohttp开发的一个轻便高效的爬虫框架,采用了scrapy的设计模式,参考了github上一些开源框架的处理逻辑。 更多详细内容可参考demo, Asyncpy
Asyncpy异步请求框架
0
Async.js异步 JS 工具
Async是一个工具模块,提供了直接而强大的JavaScript异步功能。虽然是为Node.js设计的,但是它也可以直接在浏览器中使用。Async提供了大约20个函数,包括map,reduce,fil
Async.js异步 JS 工具
0
Reqwest浏览器异步HTTP请求
reqwest用于浏览器异步HTTP请求。支持xmlHttpRequest,JSONP,CORS,和CommonJS约束。APIreqwest('path/to/html', function (re
Reqwest浏览器异步HTTP请求
0