added wss tools 3

This commit is contained in:
2026-06-18 15:25:49 +03:30
parent 30b0e480c3
commit 2a77c24dcc
3 changed files with 37 additions and 27 deletions
+10 -1
View File
@@ -82,7 +82,7 @@ class WebsocketBroadcastService
$url = $baseUrl.$this->triggerPath();
try {
Http::timeout(3)
$response = Http::timeout(3)
->withHeaders(['Content-Type' => 'application/json'])
->withOptions([
'curl' => [
@@ -90,6 +90,15 @@ class WebsocketBroadcastService
],
])
->post($url, $body);
if (! $response->successful()) {
Log::warning('Websocket broadcast rejected', [
'trigger' => $trigger,
'url' => $url,
'status' => $response->status(),
'body' => $response->body(),
]);
}
} catch (\Throwable $e) {
Log::warning('Websocket broadcast failed', [
'trigger' => $trigger,