symfony / symfony-docs

The Symfony documentation
https://symfony.com/doc
Other
2.16k stars 5.11k forks source link

Add documentation for the Server part of the webhook component #19921

Open stof opened 4 months ago

stof commented 4 months ago

The webhook component has 2 parts:

The documentation at https://symfony.com/doc/current/webhook.html covers only the client part (and does not really explain the case of custom events rather than the mailer and notifier events, as the section just has a note saying MakerBundle can help you) This server part is currently totally undocumented.

The server part works by creating a Subscriber (representing the recipient of that webhook, potentially instantiated based on settings stored in an entity for instance) and a RemoteEvent. It can then be sent:

When sending a webhook, the POST request has the remote event as JSON body and the following headers (by default, as event names are configurable):

OskarStark commented 4 months ago

cc @TimoBakx 🖖😊

javiereguiluz commented 3 months ago

Please, nobody work on this because we'll receive a PR for this soon. Thanks.

Update: this is the PR #19974