ServerAction.metadata¶
Метаданные типа ServerAction.
Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| Origin | String1 |
– | Базовая часть url запроса |
| Path* | String1 |
– | Уточняющая часть url запроса |
| Method | String |
‘GET’ | Метод запроса |
| ContentType | String |
‘application/x-www-form-urlencoded; charset=utf-8’ | Тип данных |
| Data | Object1 |
– | Данные запроса |
| Params | Object |
– | Параметры запроса |
| OnSuccess | Script | – | Устанавливает обработчик успешного завершения действия |
| OnError | Script | – | Устанавливает обработчик завершения действия с ошибкой |
* Обязательное свойство.
Examples¶
{
"ServerAction": {
"Method": "Get",
"Origin": "http://localhost:<%port%>",
"Path": "/documents/<%document%>",
"Data": {
"filter": "eq(_id,'<%_id%>')"
},
"Params": {
"port": "9900",
"document": "GetCompanyProfile988Response",
"_id": {
"Source": "MainDataSource",
"Property": "$._id"
}
},
"OnSuccess": "{ alert('onSuccess'); }",
"OnError": "{ alert('onError'); }"
}
}