Class URIUtils

java.lang.Object
com.adobe.granite.rest.utils.URIUtils

public final class URIUtils extends Object
The URIUtils provides helper methods around working with URIs.
  • Method Details

    • urlEncodePath

      public static String urlEncodePath(String toEncode)
      URL encodes a path, ensuring that any forward slashes remain unencoded.
      Parameters:
      toEncode - The path to be safely URL encoded.
      Returns:
      A URL-encoded version of the path.
    • relativize

      public static String relativize(RequestPathInfo requestPathInfo, String resourcePath)
      Relativizes the specified resourcePath against requestPathInfo.

      Parameters:
      requestPathInfo - RequestPathInfo to relativize against
      resourcePath - Resource path to relativize
      Returns:
      The resulting path