Package com.wavemaker.commons.util
Class HttpRequestUtils
- java.lang.Object
-
- com.wavemaker.commons.util.HttpRequestUtils
-
public class HttpRequestUtils extends java.lang.Object- Since:
- 11/3/16
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetApplicationBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest)static java.lang.StringgetBaseUrl(java.lang.String requestUrl)static java.lang.StringgetBaseUrl(java.net.URI uri)static java.lang.StringgetBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest)static booleanisAjaxRequest(javax.servlet.http.HttpServletRequest request)static booleanisRequestedFromIEBrowser(javax.servlet.http.HttpServletRequest httpServletRequest)static voidwriteJsonErrorResponse(MessageResource messageResource, int responseCode, javax.servlet.http.HttpServletResponse response)static voidwriteJsonErrorResponse(java.lang.String message, int responseCode, javax.servlet.http.HttpServletResponse response)
-
-
-
Method Detail
-
writeJsonErrorResponse
public static void writeJsonErrorResponse(MessageResource messageResource, int responseCode, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Throws:
java.io.IOException
-
writeJsonErrorResponse
public static void writeJsonErrorResponse(java.lang.String message, int responseCode, javax.servlet.http.HttpServletResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
getBaseUrl
public static java.lang.String getBaseUrl(java.lang.String requestUrl)
-
getBaseUrl
public static java.lang.String getBaseUrl(java.net.URI uri)
-
getBaseUrl
public static java.lang.String getBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
-
isRequestedFromIEBrowser
public static boolean isRequestedFromIEBrowser(javax.servlet.http.HttpServletRequest httpServletRequest)
-
getApplicationBaseUrl
public static java.lang.String getApplicationBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
-
isAjaxRequest
public static boolean isAjaxRequest(javax.servlet.http.HttpServletRequest request)
-
-