Sha256: aa1aad8068c747b410c1fde5b7011d35ae609e3f4dd7b716880a6c4cbf00aec5
Contents?: true
Size: 749 Bytes
Versions: 15
Compression:
Stored size: 749 Bytes
Contents
/*global define*/ define(function() { "use strict"; /** * A simple proxy that appends the desired resource as the sole query parameter * to the given proxy URL. * * @alias DefaultProxy * @constructor * * @param {String} proxy The proxy URL that will be used to requests all resources. */ var DefaultProxy = function(proxy) { this.proxy = proxy; }; /** * Get the final URL to use to request a given resource. * * @memberof DefaultProxy * * @param {String} resource The resource to request. */ DefaultProxy.prototype.getURL = function(resource) { return this.proxy + '?' + encodeURIComponent(resource); }; return DefaultProxy; });
Version data entries
15 entries across 15 versions & 1 rubygems