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

Webhook notification action #2208

Open
dkarlovi opened this issue Feb 10, 2023 · 3 comments
Open

Webhook notification action #2208

dkarlovi opened this issue Feb 10, 2023 · 3 comments

Comments

@dkarlovi
Copy link
Contributor

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);
    }
@dpfaffenbauer
Copy link
Member

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

@dkarlovi
Copy link
Contributor Author

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

@dpfaffenbauer
Copy link
Member

@dkarlovi ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants