Package open.java.toolkit.http
Class RequestUtils
- java.lang.Object
-
- open.java.toolkit.http.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.StringurlDomainOnly(java.lang.String url)Retrieves the domain from a URL.static java.lang.StringurlNoProtocol(java.lang.String url)Retrieves the URL without the protocol.static java.lang.StringurlNoSubpages(java.lang.String url)Retrieves the URL without any subpages.static java.lang.StringurlNoWww(java.lang.String url)Retrieves the URL without the "www" string.
-
-
-
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.
-
-