I have a lot of FW/1 controllers which can perform differing functions based on whether the request is a get or post. I have a lot of code that looks like this
if (cgi.request_method == "post") {
I recently installed Commandbox's CodeChecker CLI and I turned it loose on my controllers. I am getting warnings like:
Don't use shared scope variables in a CFC | Standards | Severity: 4
Avoid using shared scope variables from within a CFC as it breaks encapsulation.
Users//jamesmohler/Sites/ColdFusion/P.../messagesController.cfc:13
I have gone back to the FW/1 Reference Manual , and I have noted that it has a function called getCGIRequestMethod()
Question
Have I been testing for POST
wrongly all along? What exactly am I being encouraged to avoid?