code: protected void appendBaseURL(StringBuilder buffer,String resource,HTTPClientConfiguration configuration)
      {
          buffer.append("http");
          if(configuration.isSSL())
          {
              buffer.append("s");
          }
          buffer.append("://");
          buffer.append(configuration.getHostName());
          int port=configuration.getPort();
          if(port>0)
          {
              buffer.append(":");
              buffer.append(port);
          }
          if((resource!=null)&&(resource.length()>0))
          {
              if(!resource.startsWith("/"))
              {
                  buffer.append("/");
              }
              buffer.append(resource);
          }
      }
docs: This function appends the base URL (protocol, host, port and resource) to the
  provided buffer.
  
  @param   buffer
  The buffer to update
  @param   resource
  The HTTP resource
  @param   configuration
  The HTTP configuration