From 18bf4a426c2de1f8399e6426797c9c227cbbc37e Mon Sep 17 00:00:00 2001 From: nmaillat Date: Thu, 29 Feb 2024 11:59:58 +0100 Subject: [PATCH] webhook rollback http verb --- lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php | 2 +- .../Tests/Phrasea/WorkerManager/Worker/WebhookWorkerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php index 6e798eaafb..7e8a482921 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php @@ -240,7 +240,7 @@ public function deliverEvent(Client $httpClient, array $thirdPartyApplications, // make delivery Id as index $requests[$delivery->getId()] = new Request( - 'GET', + 'POST', $uniqueUrl, ['Content-Type' => 'application/json'], json_encode($data) diff --git a/tests/Alchemy/Tests/Phrasea/WorkerManager/Worker/WebhookWorkerTest.php b/tests/Alchemy/Tests/Phrasea/WorkerManager/Worker/WebhookWorkerTest.php index 36938aeac4..cde55f5931 100644 --- a/tests/Alchemy/Tests/Phrasea/WorkerManager/Worker/WebhookWorkerTest.php +++ b/tests/Alchemy/Tests/Phrasea/WorkerManager/Worker/WebhookWorkerTest.php @@ -97,7 +97,7 @@ private function deliverEventTest(Client $client, WebhookEvent $event, $payload) /** @var Request $request */ foreach ($requestResult as $request) { - $this->assertEquals('GET', $request->getMethod()); + $this->assertEquals('POST', $request->getMethod()); $this->assertEquals('http://webhook.com/webhook/'."#".$deliveryId, $request->getUri()); $this->assertArrayHasKey('Content-Type', $request->getHeaders()); $this->assertContains('application/json', $request->getHeader('Content-Type'));