Class RequestUtils


  • public final class RequestUtils
    extends Object
    • Method Detail

      • isModificationRequest

        public static boolean isModificationRequest​(javax.servlet.http.HttpServletRequest request)
        Indicates whether the given HTTP request may be intended to modify a resource, based on the request method. POST, PUT, PATCH and DELETE request methods indicate intent to create/modify/delete a resource.
        Parameters:
        request - the request to check
        Returns:
        true if this is a resource modification request, false otherwise
      • isModificationRequestMethod

        public static boolean isModificationRequestMethod​(org.springframework.web.bind.annotation.RequestMethod method)
        Indicates whether the given HTTP request method may be intended to modify a resource. POST, PUT, PATCH and DELETE request methods indicate intent to create/modify/delete a resource.
        Parameters:
        method - the HTTP request method to check
        Returns:
        true if this is a resource modification request method, false otherwise