class Rack::Events

This middleware provides hooks to certain places in the request /

response lifecycle. This is so that middleware that don’t need to filter the response data can safely leave it alone and not have to send messages down the traditional “rack stack”.

The events are:

## Order

on_start is called on the handlers in the order that they were passed to the constructor. on_commit, on_send`, on_finish, and on_error are called in the reverse order. on_finish handlers are called inside an ensure block, so they are guaranteed to be called even if something raises an exception. If something raises an exception in a on_finish method, then nothing is guaranteed.