code: function (baseURL, params) {
  
              var encodedArgs = [];
  
              if (params){
  
                  var key, urlarg;
                  var urlize = encodeURIComponent;
  
                  for (key in params){
                      if (params.hasOwnProperty(key)) {
                          urlarg = urlize(key)+'='+urlize(params[key]);
                          encodedArgs.push(urlarg);
                      }
                  }
              }
  
              if (encodedArgs.length > 0){
  
                  if (baseURL.indexOf('?') == -1)
                      return baseURL + '?' + encodedArgs.join('&');
                  return baseURL + '&' + encodedArgs.join('&');
              }
              return baseURL;
          }
docs: =================================================================== helpers functions those are attached to prototype to ease reuse and testing...