> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# msm:rest

> HTTP-запрос и рендер ответа

`<msm:rest>` вызывает внешний HTTP-endpoint (GET/POST) и рендерит ответ через templates.

## Каркас

```html theme={null}
<msm:rest id="remote" endpoint="https://api.example.com/items" method="GET" item-name="r">
  <msm:template>
    <div>${r|value}</div>
  </msm:template>
  <msm:empty>
    <div>No data</div>
  </msm:empty>
</msm:rest>
```

## Атрибуты

| Атрибут             | Значение                                                                 |
| ------------------- | ------------------------------------------------------------------------ |
| `endpoint`          | HTTP URL.                                                                |
| `method`            | `GET` или `POST`.                                                        |
| `request`           | JSON request payload (для POST) или params (в зависимости от настройки). |
| `header` / `footer` | Опциональный JSON для дополнительных секций.                             |
| `item-name`         | Префикс внутри templates.                                                |
