Features of customization after Bitrix24 23.300.0 update
\Bitrix\Main\Loader::includeModule('rest');
class MyEventProvider extends \Bitrix\Rest\Event\ProviderOAuth
{
public function send(array $queryData)
{
$http = new \Bitrix\Main\Web\HttpClient();
foreach($queryData as $key => $item)
{
if(preg_match('/192\.168\./', $item['query']['QUERY_URL'])) // directly sending handlers, having 192.168. in the address
{
$http->post($item['query']['QUERY_URL'], $item['query']['QUERY_DATA']);
unset($queryData[$key]);
}
}
if(count($queryData) > 0)
{
parent::send(array_values($queryData)); // all the rest is to be sent via the standard mechanism
}
}
}
\Bitrix\Rest\Event\Sender::setProvider(MyEventProvider::instance());
Last updated