> For the complete documentation index, see [llms.txt](https://marblejs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://marblejs.gitbook.io/docs/http.md).

# HTTP

- [Effects](https://marblejs.gitbook.io/docs/http/effects.md): Effect is the main building block of the whole framework. It is just a function that returns a stream of events. Using its generic interface we can define API endpoints, event handlers or middlewares.
- [Middlewares](https://marblejs.gitbook.io/docs/http/middlewares.md): In Marble.js, middlewares are streams of side-effects that can be composed and plugged-in to our request/event lifecycle to perform certain actions before reaching the designated Effect.
- [Routing](https://marblejs.gitbook.io/docs/http/routing.md): Routing determines how an application responds to a client request to a particular endpoint, which is a path and a specific HTTP method (eg. GET, POST).
- [Errors](https://marblejs.gitbook.io/docs/http/errors.md): Every Marble.js listener factory allows you to intercept outgoing errors via dedicated error$ handler.
- [Output](https://marblejs.gitbook.io/docs/http/output.md): Every Marble.js listener factory allows you to intercept outgoing messages via dedicated output$ handler.
- [Context](https://marblejs.gitbook.io/docs/http/context.md): DI is a very simple concept, which can be implemented in many different ways. Marble.js introduces a Context, which is an abstraction over Reader monad implementation of the DI system.
- [Advanced](https://marblejs.gitbook.io/docs/http/advanced.md)
- [Logging](https://marblejs.gitbook.io/docs/http/advanced/logging.md)
- [Validation](https://marblejs.gitbook.io/docs/http/advanced/validation.md)
- [Server Events](https://marblejs.gitbook.io/docs/http/advanced/server-events.md)
- [Streaming](https://marblejs.gitbook.io/docs/http/advanced/streaming.md)
- [Continuous mode](https://marblejs.gitbook.io/docs/http/advanced/modes.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://marblejs.gitbook.io/docs/http.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.
