From c09a98b886a1377926a76f83bfcfd9f9c3218f9f Mon Sep 17 00:00:00 2001 From: denis Date: Tue, 27 Jan 2026 12:01:18 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20iblock/request.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iblock/request.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 iblock/request.md diff --git a/iblock/request.md b/iblock/request.md new file mode 100644 index 0000000..04444b6 --- /dev/null +++ b/iblock/request.md @@ -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); +``` \ No newline at end of file