Package io.microsphere.spring.web.util
Class WebRequestUtils
- java.lang.Object
-
- io.microsphere.spring.web.util.WebRequestUtils
-
public abstract class WebRequestUtils extends java.lang.ObjectWebRequestUtilities class- Since:
- 1.0.0
- Author:
- Mercy
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPATH_ATTRIBUTEName of Servlet request attribute that holds aresolvedlookupPath.
-
Constructor Summary
Constructors Constructor Description WebRequestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetContentType(org.springframework.web.context.request.NativeWebRequest request)static java.lang.StringgetMethod(org.springframework.web.context.request.NativeWebRequest request)static java.lang.StringgetResolvedLookupPath(org.springframework.web.context.request.NativeWebRequest request)Return a previouslyresolvedlookupPath.static booleanhasBody(org.springframework.web.context.request.NativeWebRequest request)static booleanisPreFlightRequest(org.springframework.web.context.request.NativeWebRequest request)Returnstrueif the request is a valid CORS pre-flight one by checkingOPTIONSmethod withOriginandAccess-Control-Request-Methodheaders presence.
-
-
-
Method Detail
-
getMethod
public static java.lang.String getMethod(org.springframework.web.context.request.NativeWebRequest request)
-
isPreFlightRequest
public static boolean isPreFlightRequest(org.springframework.web.context.request.NativeWebRequest request)
Returnstrueif the request is a valid CORS pre-flight one by checkingOPTIONSmethod withOriginandAccess-Control-Request-Methodheaders presence.
-
getContentType
public static java.lang.String getContentType(org.springframework.web.context.request.NativeWebRequest request)
-
hasBody
public static boolean hasBody(org.springframework.web.context.request.NativeWebRequest request)
-
getResolvedLookupPath
public static java.lang.String getResolvedLookupPath(org.springframework.web.context.request.NativeWebRequest request)
Return a previouslyresolvedlookupPath.- Parameters:
request- the current request- Returns:
- the previously resolved lookupPath
- Throws:
java.lang.IllegalArgumentException- if the lookup path is not found
-
-