Class UrlUtils


  • public final class UrlUtils
    extends Object
    Some utilities to simplify working with URL's
    Author:
    Patrick Deenen (patrick@opencircle.solutions)
    • Method Detail

      • createUrl

        public static URI createUrl​(String hostAndPath,
                                    String... keyValues)
                             throws URISyntaxException
        Create an http url query with the given key value parameters, will apply url encoding on the parameter values.
        Parameters:
        hostAndPath - the base url
        keyValues - Provide key1, value1, key2, value2, etc.
        Returns:
        The URI
        Throws:
        URISyntaxException