code: public String getFullUrl(String restUrl) {
  
          String result = "";
  
          try {
              result = (new URL(root.getConfig().getBaseUrl())).getProtocol() + "://" + this.getHost() + restUrl;
          } catch (Exception ex) {
          }
  
          return result;
      }
docs: Gets complete url.
  
  @param restUrl Rest url.
  @return Complete url.