Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/WebhookChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function send($notifiable, Notification $notification)
$webhookData = $notification->toWebhook($notifiable)->toArray();

$response = $this->client->post($url, [
'body' => json_encode(Arr::get($webhookData, 'data')),
'json' => Arr::get($webhookData, 'data'),
'verify' => false,
'headers' => Arr::get($webhookData, 'headers'),
]);
Expand Down
4 changes: 2 additions & 2 deletions tests/ChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function it_can_send_a_notification()
->once()
->with('https://notifiable-webhook-url.com',
[
'body' => '{"payload":{"webhook":"data"}}',
'json' => ['payload' => ['webhook' => 'data']],
'verify' => false,
'headers' => [
'User-Agent' => 'WebhookAgent',
Expand All @@ -42,7 +42,7 @@ public function it_can_send_a_notification_with_2xx_status()
->once()
->with('https://notifiable-webhook-url.com',
[
'body' => '{"payload":{"webhook":"data"}}',
'json' => ['payload' => ['webhook' => 'data']],
'verify' => false,
'headers' => [
'User-Agent' => 'WebhookAgent',
Expand Down