You can use `$this->request->isPost()` instead.