Controller
isPatch()
Signature
Section titled “Signature”isPatch() — returns boolean
Available in: controller
Category: Miscellaneous Functions
Description
Section titled “Description”Checks whether the current HTTP request was made using the PATCH method. Useful when building RESTful APIs where PATCH is used to partially update resources.
Examples
Section titled “Examples”<cfscript>
if (isPatch()) {
writeOutput("This is a PATCH request.");
} else {
writeOutput("This is a different type of request.");
}
</cfscript>