Skip to content

Commit

Permalink
webhook rollback http verb
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaillat committed Feb 29, 2024
1 parent dc1fad6 commit 18bf4a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 18bf4a4

Please sign in to comment.