->withOptions(['allow_redirects' => ['strict' => true]])
->timeout($this->webhook->timeout)
->post($this->webhook->endpoint, $webhookData);
-
} catch (\Exception $exception) {
$lastError = $exception->getMessage();
Log::error("Webhook call to endpoint {$this->webhook->endpoint} failed with error \"{$lastError}\"");
'endpoint' => 'https://example.com/webhook',
'events' => ['all'],
'active' => 'true',
+ 'timeout' => 4,
]);
$resp->assertRedirect('/settings/webhooks');
'name' => 'My first webhook',
'endpoint' => 'https://example.com/webhook',
'active' => true,
+ 'timeout' => 4,
]);
/** @var Webhook $webhook */
'endpoint' => 'https://example.com/updated-webhook',
'events' => [ActivityType::PAGE_CREATE, ActivityType::PAGE_UPDATE],
'active' => 'true',
+ 'timeout' => 5
]);
$resp->assertRedirect('/settings/webhooks');
'name' => 'My updated webhook',
'endpoint' => 'https://example.com/updated-webhook',
'active' => true,
+ 'timeout' => 5,
]);
$trackedEvents = $webhook->trackedEvents()->get();