Class UrlUtil


  • public final class UrlUtil
    extends java.lang.Object
    A utility for managing URLs.
    Author:
    Ween Jiann Lee
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getBaseUrl​(Request request)
      Get base url from a request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBaseUrl

        public static java.lang.String getBaseUrl​(Request request)
                                           throws java.net.URISyntaxException
        Get base url from a request.
        Parameters:
        request - an instance of request
        Returns:
        base URL string
        Throws:
        java.net.URISyntaxException - if not a proper URL