rest.js 是一个 RESTful HTTP 客户端的 JavaScript 包。
示例代码:
var rest, mime, client; rest = require('rest'), mime = require('rest/interceptor/mime'); client = rest.chain(mime); client({ path: '/data.json' }).then(function(response) { console.log('response: ', response); });