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'));