Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHRAS-4028 webhook in POST #4480

Merged
merged 1 commit into from
Feb 29, 2024
Merged
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 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
Loading