3 var assert = require('assert')
4 var url = require('url')
7 * This is meant to be overridden in specific implementations if you
8 * want specialized behavior for metadata (i.e. caching).
10 function get (uri, params, cb) {
11 assert(typeof uri === 'string', 'must pass registry URI to get')
12 assert(params && typeof params === 'object', 'must pass params to get')
13 assert(typeof cb === 'function', 'must pass callback to get')
15 var parsed = url.parse(uri)
17 parsed.protocol === 'http:' || parsed.protocol === 'https:',
18 'must have a URL that starts with http: or https:'
21 this.request(uri, params, cb)