Добавить iblock/request.md

This commit is contained in:
2026-01-27 12:01:18 +00:00
parent bbcd8d59ec
commit c09a98b886

12
iblock/request.md Normal file
View File

@@ -0,0 +1,12 @@
### Получаем POST в формате JSON**
```php
use Bitrix\Main\Context;
$request = Context::getCurrent()->getRequest();
$request->getJsonList()->get('id')
```
### Отправка ответа в формате json
```php
header('Content-Type: application/json; charset=utf-8');
echo json_encode($res_data,JSON_UNESCAPED_UNICODE);
```