Why request parameter is not available?

Hi all. Why the code below returns NULL. Although data is sent (screenshot)

Moreover, the data also sent the code of Bitrix:
 method: 'POST',
 dataType: 'json',
 url: self.basketUrl,
 data: self.basketParams,
 onsuccess: BX.proxy(this.basketResult, this)

POST does not transmit.
June 5th 19 at 22:03
1 answer
June 5th 19 at 22:05
https://dev.1c-bitrix.ru/api_d7/bitrix/main/reques... - I'm watching.
In General code looks like this:
$this->request = \Bitrix\Main\Context::getCurrent()->getRequest();
$addByAjax = $this->request->get('ajax_basket') === 'Y';

he is of the class CBitrixComponent
I just stopped added items to the cart. So I am perplexed. - Dave75 commented on June 5th 19 at 22:08
If you pass ajax_basket in the url the parameter is returned. - Dave75 commented on June 5th 19 at 22:11
on your link it says that:
$value = $request->get("param"); // get parameter GET or POST

If you do not pass this parameter, it will return null, what is not working? - jett_Hilpert commented on June 5th 19 at 22:14
$addByAjax = $this->request->get('ajax_basket') === 'Y';

Parameter that is the query - Dave75 commented on June 5th 19 at 22:17
may be all the same, the link is correct - https://dev.1c-bitrix.ru/api_d7/bitrix/main/httpre...

Because the documentation indicated that getRequest() returns an object of class \Bitrix\Main\HttpRequest - https://dev.1c-bitrix.ru/api_d7/bitrix/main/contex...

Your link contains an abstract class, not the fact that \Bitrix\Main\HttpRequest from his naslediya - jett_Hilpert commented on June 5th 19 at 22:20

Find more questions by tags 1C-Bitrix