<msm:rest> вызывает внешний HTTP-endpoint (GET/POST) и рендерит ответ через templates.
Серверные компоненты
msm:rest
HTTP-запрос и рендер ответа
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
HTTP-запрос и рендер ответа
<msm:rest> вызывает внешний HTTP-endpoint (GET/POST) и рендерит ответ через templates.
<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. |