Processing data sent to a custom handler
This note provides supplementary information about the server's implementation of the standard HTTP POST method to process data sent to the server for special handling.
POST method is the protocol used by HTML forms to accept data for processing. It is the only method other than
GET that is directly supported via HTML.
POST is dissimilar from
PATCH in that the request's
:path pseudo-header identifies a module to be used as a data handler. By way of constrast, the other two method's
:path pseudo-header identifies the resource that is the target of the update.
In many programming paradigms the
:path is both the data handler and the target resource. This is often termed a post-back. The RWSERVE software does not restrict
POST methods one way or the other, so using post-backs is allowed, but not required.
When used in either an AJAX call, or with an HTTP <form method='POST'>, a software developer must write a custom module that will carry out the request to process the data, and the webmaster must configure a dynamic route with
*methods=POST which references that module.
The server's request/response cycle for
POST requests is fulfilled using this sequence of handlers:
|1||Server Name Indication||no||no|
|10||Content Decoding (Post)||no||no|
Successful responses are finalized by the dynamic module with any of these status codes:
200"OK" when the response contains a payload and these response headers:
204"No Content" when the response has no payload.
303"See Other" when the processing is successful and the browser should issue a follow-on
GETrequest to the URI declared in the response's
307"Temporary Redirect" when the processing is successful and the browser should issue a follow-on
POSTrequest to the URI declared in the response's
For reference purposes, refer to IETF RFC 7231 Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content section 4.3.3 for the basic protocol expected of HTTP