Class URIs


  • public class URIs
    extends Object
    • Constructor Detail

      • URIs

        public URIs()
    • Method Detail

      • appendContextPath

        public static String appendContextPath​(String url,
                                               String contextPath)
        Appends a context path to a base url.
        Parameters:
        url - The base url.
        contextPath - The context path to be appended.
        Returns:
        A full url with the context path appended.
      • urlEncode

        public static String urlEncode​(String value,
                                       String valueEncoding)
        URL encodes the value towards the ISO-8859-1 charset
      • urlDecode

        public static String urlDecode​(String value)
      • appendQueryString

        public static String appendQueryString​(String url,
                                               String queryString)
        Appends a query string to a url.

        This method checks url to see if the appended query string requires a '?' or '&' to be prepended.

        This code can be used to make sure the url ends with ? or & by calling appendQueryString(url, "")

        Parameters:
        url - The base url.
        queryString - The query string to be appended, should not contain the '?' character.
        Returns:
        A full url with the query string appended.

        TODO: remove this and replace with Requetss.appendQueryString