$request = AphrontRequest::getHTTPRequest(); $isPostRequest = $request->isFormPost(); if ($isPostRequest) { // process form data } else { // display form }In this example, we first get the current HTTP request using the `AphrontRequest::getHTTPRequest()` static method. We then use the `isFormPost()` method to check if the request was made using the POST method. If it was, we can process the form data. If not, we display the form. Package library: Phabricator.