CoreShop icon indicating copy to clipboard operation
CoreShop copied to clipboard

Webhook notification action

Open dkarlovi opened this issue 3 years ago • 3 comments

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no

Pretty simple, a notification action which basically does this:

    public function apply($subject, NotificationRuleInterface $rule, array $configuration, array $params = []): void
    {
        $request = $this->messageFactory
            ->createRequest('POST', $configuration['url'])
            ->withHeader('Content-Type', 'application/json')
            ->withBody($this->streamFactory->createStream(json_encode($this->eventCreator->create($subject, $rule, $params), \JSON_THROW_ON_ERROR)))
        ;

        $this->client->sendRequest($request);
    }

dkarlovi avatar Feb 10 '23 11:02 dkarlovi

@dkarlovi did you implement this? could you create a PR?

dpfaffenbauer avatar Dec 12 '23 08:12 dpfaffenbauer

I've implemented this on my project, would need to clean it up substantially to PR.

dkarlovi avatar Dec 18 '23 09:12 dkarlovi

@dkarlovi ?

dpfaffenbauer avatar Aug 21 '24 14:08 dpfaffenbauer