Dispatches requests to the appropriate controller and takes care of reloading the app after each request when Dependencies.load? is true.
Cleanup the application by clearing out loaded classes so they can be reloaded on the next request without restarting the server.
Backward-compatible class method takes CGI-specific args. Deprecated in favor of Dispatcher.new(output, request, response).dispatch!
If the block raises, send status code as a last-ditch response.
Add a preparation callback. Preparation callbacks are run before every request in development mode, and before the first request in production mode.
An optional identifier may be supplied for the callback. If provided, to_prepare may be called again with the same identifier to replace the existing callback. Passing an identifier is a suggested practice if the code adding a preparation block may be reloaded.
Declare a block to be called after each dispatch. Run in reverse of the order declared.
Declare a block to be called before each dispatch. Run in the order declared.