Class URLUtils


  • public class URLUtils
    extends Object
    Author:
    Andrea Di Cesare <andrea@softinstigate.com>
    • Constructor Detail

      • URLUtils

        public URLUtils()
    • Method Detail

      • removeTrailingSlashes

        public static String removeTrailingSlashes​(String s)
        given string /ciao/this/has/trailings///// returns /ciao/this/has/trailings
        Parameters:
        s -
        Returns:
        the string s without the trailing slashes
      • decodeQueryString

        public static String decodeQueryString​(String qs)
        decode the percent encoded query string
        Parameters:
        qs -
        Returns:
        the undecoded string
      • getParentPath

        public static String getParentPath​(String path)
        Parameters:
        path -
        Returns:
      • getPrefixUrl

        public static String getPrefixUrl​(io.undertow.server.HttpServerExchange exchange)
        Parameters:
        exchange -
        Returns:
      • getQueryStringRemovingParams

        public static String getQueryStringRemovingParams​(io.undertow.server.HttpServerExchange exchange,
                                                          String... paramsToRemove)
        Parameters:
        exchange -
        paramsToRemove -
        Returns: