Class RequestUtils


  • public class RequestUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RequestUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String urlDomainOnly​(java.lang.String url)
      Retrieves the domain from a URL.
      static java.lang.String urlNoProtocol​(java.lang.String url)
      Retrieves the URL without the protocol.
      static java.lang.String urlNoSubpages​(java.lang.String url)
      Retrieves the URL without any subpages.
      static java.lang.String urlNoWww​(java.lang.String url)
      Retrieves the URL without the "www" string.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestUtils

        public RequestUtils()
    • Method Detail

      • urlDomainOnly

        public static java.lang.String urlDomainOnly​(java.lang.String url)
        Retrieves the domain from a URL.
        Parameters:
        url - The URL to retrieve the domain from.
        Returns:
        The domain.
      • urlNoSubpages

        public static java.lang.String urlNoSubpages​(java.lang.String url)
        Retrieves the URL without any subpages.
        Parameters:
        url - The URL to parse from.
        Returns:
        The URL without any subpages.
      • urlNoWww

        public static java.lang.String urlNoWww​(java.lang.String url)
        Retrieves the URL without the "www" string.
        Parameters:
        url - The URL to parse from.
        Returns:
        The URL without the "www" string.
      • urlNoProtocol

        public static java.lang.String urlNoProtocol​(java.lang.String url)
        Retrieves the URL without the protocol.
        Parameters:
        url - The URL to parse from.
        Returns:
        The URL without the protocol.