webhookParams(); if (!isset($params['event'])) { $params['event'] = $event::name(); } $json = json_encode($params, JSON_UNESCAPED_SLASHES); $httpClient = HttpClient::post($webhook_url, $json, [ 'headers' => [ 'Content-Type' => 'application/json', ], 'allow_redirects' => false, ]); if ($httpClient->hasError()) { trigger_error($httpClient->getError()); } } }