code: function (url, data, options) {
        var urlTemplateRegex = /:([a-zA-Z_$][\w_$]*)/;
        var templateContext = this.makeUrlTemplateContext(data, options);
        var matches = urlTemplateRegex.exec(url);
        // limit to 100 to avoid runaway recursion
        for (var i = 0; matches && i < 100; i++) {
          url = url.replace(matches[0], templateContext[matches[1]] || '');
          matches = urlTemplateRegex.exec(url);
        }
        return url;
      }
docs: Substitutes template placeholders in a URL with actual values. URL placeholders may be specified in the form ``:name``, where "name" is the name of a property in the ``data`` or ``options`` object. This feature is provided as a shortcut for simple usecases and for compatibility with services such as Restify and Express. If it does not meet your needs, you should define a custom url getter function.