Package be.personify.util.http
Class HttpUtil
- java.lang.Object
-
- be.personify.util.http.HttpUtil
-
public class HttpUtil extends Object
Utility class for http stuff- Author:
- vanderw
-
-
Constructor Summary
Constructors Constructor Description HttpUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringdetectServerName(javax.servlet.http.HttpServletRequest httpServletRequest)static StringextractServerNameFromForwardedFor(String forwardedFor)StringgetClientIpAddress(javax.servlet.http.HttpServletRequest request)static StringgetFullURL(javax.servlet.http.HttpServletRequest request)Gets the full urlstatic booleanisMultipart(javax.servlet.http.HttpServletRequest request)Detects if a request is multipart
-
-
-
Method Detail
-
getFullURL
public static String getFullURL(javax.servlet.http.HttpServletRequest request)
Gets the full url- Parameters:
request- the HttpServletRequest- Returns:
- the string containing the full url
-
isMultipart
public static boolean isMultipart(javax.servlet.http.HttpServletRequest request)
Detects if a request is multipart- Parameters:
request- the HttpServletRequest- Returns:
- a boolean indicating if it is multipart
-
detectServerName
public static String detectServerName(javax.servlet.http.HttpServletRequest httpServletRequest)
-
extractServerNameFromForwardedFor
public static String extractServerNameFromForwardedFor(String forwardedFor)
-
getClientIpAddress
public String getClientIpAddress(javax.servlet.http.HttpServletRequest request)
-
-