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