code: function(path, params) {
          var queryString = this.query_string;
          for (var param in params) {
              var re = new RegExp(":"+ param)
              var found = false;
              if (path.search(re) != -1) {
                  path = path.replace(re, params[param]);
                  found = true;
              }
              for (var query in queryString) {
                  if (queryString[query].search
                      && queryString[query].search(re) != -1) {
                      queryString[query] = queryString[query].replace(re, params[param]);
                      found = true;
                  }
              }
              // exclude params in headers
              for (var header in this.headers) {
                  if (this.headers[header].search(re) != -1) {
                      found = true;
                  }
              }
              if (!found)
                  queryString[param] = params[param];
          }
          var query = querystring.stringify(queryString);
          return path + ((query != "") ? "?"+ query : "");
      }
docs: Format uri with params
  add orphelin params in query string