code: public String getURL()
    {
      int port = getPort();
  
      return (getScheme() + "://" + getHost() + 
              (port == 80 ? "" : ":" + getPort()) +
              getPath() +
              (_query == null ? "" : "?" + _query));
    }
docs: Returns a full URL for the path.