Class HttpUriBuilder


  • public class HttpUriBuilder
    extends Object
    Helper class to build valid HTTP(S) URIs.
    • Constructor Detail

      • HttpUriBuilder

        public HttpUriBuilder()
    • Method Detail

      • buildUri

        public String buildUri​(String scheme,
                               String host,
                               int port)
        Creates an URI based on the given data.
        Parameters:
        scheme - the scheme to insert into the URI.
        host - the host to insert into the URI.
        port - the port to insert into the URI.
        Returns:
        a URI as string.
      • buildUri

        public String buildUri​(String host,
                               int port)
        Creates an HTTP URI with given host and port.
        Parameters:
        host - the host to insert into the URI.
        port - the port to insert into the URI.
        Returns:
        a URI as string.
      • buildSecuredUri

        public String buildSecuredUri​(String host,
                                      int port)
        Creates an HTTPS URI with given host an port.
        Parameters:
        host - the host to insert into the URI.
        port - the port to insert into the URI.
        Returns:
        a URI as string.