Package com.aquima.web.util
Class RequestUtils
java.lang.Object
com.aquima.web.util.RequestUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isModificationRequest
(jakarta.servlet.http.HttpServletRequest request) Indicates whether the given HTTP request may be intended to modify a resource, based on the request method.static boolean
isModificationRequestMethod
(org.springframework.web.bind.annotation.RequestMethod method) Indicates whether the given HTTP request method may be intended to modify a resource.
-
Method Details
-
isModificationRequest
public static boolean isModificationRequest(jakarta.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
-