Class WebRequestUtils

java.lang.Object
io.microsphere.spring.web.util.WebRequestUtils

public abstract class WebRequestUtils extends Object
WebRequest Utilities class
Since:
1.0.0
Author:
Mercy
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getContentType(org.springframework.web.context.request.NativeWebRequest request)
     
    static String
    getMethod(org.springframework.web.context.request.NativeWebRequest request)
     
    static String
    getResolvedLookupPath(org.springframework.web.context.request.NativeWebRequest request)
    Return a previously resolved lookupPath.
    static boolean
    hasBody(org.springframework.web.context.request.NativeWebRequest request)
     
    static boolean
    isPreFlightRequest(org.springframework.web.context.request.NativeWebRequest request)
    Returns true if the request is a valid CORS pre-flight one by checking OPTIONS method with Origin and Access-Control-Request-Method headers presence.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebRequestUtils

      public WebRequestUtils()
  • Method Details

    • getMethod

      public static String getMethod(org.springframework.web.context.request.NativeWebRequest request)
    • isPreFlightRequest

      public static boolean isPreFlightRequest(org.springframework.web.context.request.NativeWebRequest request)
      Returns true if the request is a valid CORS pre-flight one by checking OPTIONS method with Origin and Access-Control-Request-Method headers presence.
    • getContentType

      public static String getContentType(org.springframework.web.context.request.NativeWebRequest request)
    • hasBody

      public static boolean hasBody(org.springframework.web.context.request.NativeWebRequest request)
    • getResolvedLookupPath

      public static String getResolvedLookupPath(org.springframework.web.context.request.NativeWebRequest request)
      Return a previously resolved lookupPath.
      Parameters:
      request - the current request
      Returns:
      the previously resolved lookupPath
      Throws:
      IllegalArgumentException - if the lookup path is not found