IsRequestPost (open)

Check whether the current HTTP request was a POST request

Syntax

LOADLIB "mod::system/lib/webserver.whlib";

BOOLEAN FUNCTION IsRequestPost()

Return value

BOOLEAN

true if the current request was a Post request.

Examples

// Is this was a post request? If so, process the input
IF ( isRequestPost() )
{
  // get all variables
  RECORD ARRAY allVariables := GetAllWebVariables();

  // loop through data and make sure no variable was left empty
  FOREVERY (RECORD theVariable FROM allVariables)
  {
    IF (theVariable.value = "")
      Abort("Variable " || theVariable.name || " was left empty");
  }
}