Skip to content

Controller

isPatch()

isPatch() — returns boolean

Available in: controller Category: Miscellaneous Functions

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.

<cfscript>
if (isPatch()) {
    writeOutput("This is a PATCH request.");
} else {
    writeOutput("This is a different type of request.");
}
</cfscript>