MCPcopy
hub / github.com/CodeboxIDE/codebox / get

Function get

core/cb.addons/registry.js:6–23  ·  view source on GitHub ↗
(url, options)

Source from the content-addressed store, hash-verified

4
5// get content from an addons registry
6var get = function(url, options) {
7 var d = Q.defer();
8 request(_.extend({
9 method: "GET",
10 url: url+"/api/addons?limit=1000",
11 json: true,
12 headers: {}
13 }, options || {}),
14 function(error, response, body) {
15 if (!error && response.statusCode == 200) {
16 d.resolve(body);
17 } else {
18 d.reject(error || body.message || body);
19 }
20 });
21
22 return d.promise;
23};
24
25module.exports = {
26 'get': get

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected