Suspending Resource Handlers

Suspending Resource Handlers

  (send/suspend PROC) => PARAMETERS

This procedure captures the current continuation, assigns a URI to it, applies

to the URI and terminates the current resource handler returning the RESPONSE.

When a request is sent to the generated URI, the captured continuation is resumed and the original call to send/suspend returns the hash table of PARAMETERS for the new request.

The default handling mechanism serializes the captured continuations and wraps them with authenticated encryption before stuffing them into the URL itself. Thus the server doesn't have to store the continuations persistently and the client cannot tamper with them.