# Rack

The foundation of Rails and all other significant Ruby-based web frameworks is a simple HTTP adapter library called Rack.

Rack exists to standardise the interface between multiple Ruby Web frameworks and Ruby Web servers.

Rack abstracts away the handling of HTTP requests and responses into a single, simple call method.

Rails leverages Rack middlewares in a modular and extensible manner. Much of Action Controller is implemented as Rack middleware modules.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://whl.gitbook.io/masterrr/tools/rack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
