Furnace action lifecycle
Furnace framework » Furnace actions

Prev:Form validation with actions
Next:Furnace page actions


GET request lifecycle
A GET request results in the following sequence of events:
The init quotation is called.
The authorize quotation is called.
If the GET request was generated as a result of form validation failing during a POST, then the form values entered by the user, along with validation errors, are stored in HTML form values.
The display quotation is called; it is expected to output an HTTP response on the stack.

Any one of the above steps can perform validation; if validation-failed is called during a GET request, the client receives a <400> error.

HEAD request lifecycle
A HEAD request proceeds exactly like a GET request. The only difference is that the body slot of the response object is never rendered.

DELETE request lifecycle
A DELETE request is supposed to act on a whole resources, i.e. a URL sans query parameters. Nevertheless, http.server accepts query parameters that may be used for authorization. A DELETE request results in the following sequence of events:
The init quotation is called.
The authorize quotation is called.
The delete quotation is called; it is expected to output an HTTP response on the stack. By convention, this response should be either a <redirect> (which generates a <303> response) or, when successful, one of <200>, <202> or <204> responses.

Any one of the above steps can perform validation; if validation-failed is called during a DELETE request, the client is sent back to the originating page with validation errors passed in a Furnace conversation scope.

POST request lifecycle
A POST request results in the following sequence of events:
The validate quotation is called.
The authorize quotation is called.
The submit quotation is called; it is expected to output an HTTP response on the stack. By convention, this response should be a <redirect>.

Any one of the above steps can perform validation; if validation-failed is called during a POST request, the client is sent back to the page containing the form submission, with current form values and validation errors passed in a Furnace conversation scope.