It processes the headers and contents of HTTP requests, creating an instance of the Request object. It then passes the Request object through middleware and then to the rack application. The rack application creates an instance of the Response object and sends it back through the middleware, and the hander turns it into the headers and contents of the HTTP response.
source
share