You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ WebhookCall::create()
116
116
->dispatch();
117
117
```
118
118
119
-
This will send a post request to `https://other-app.com/webhooks`. The body of the request will be JSON encoded version of the array passed to `payload`. The request will have a header called `Signature` that will contain a signature the receiving app can use [to verify](https://github.com/spatie/laravel-webhook-server#how-signing-requests-works) the payload hasn't been tampered with. Dispatching a webhook call will also fire a `WebhookCallDispatchedEvent`.
119
+
This will send a post request to `https://other-app.com/webhooks`. The body of the request will be JSON encoded version of the array passed to `payload`. The request will have a header called `Signature` that will contain a signature the receiving app can use [to verify](https://github.com/spatie/laravel-webhook-server#how-signing-requests-works) the payload hasn't been tampered with. Dispatching a webhook call will also fire a `DispatchingWebhookCallEvent`.
120
120
121
121
If the receiving app doesn't respond with a response code starting with `2`, the package will retry calling the webhook after 10 seconds. If that second attempt fails, the package will attempt to call the webhook a final time after 100 seconds. Should that attempt fail, the `FinalWebhookCallFailedEvent` will be raised.
122
122
@@ -384,9 +384,9 @@ WebhookCall::create()
384
384
### Events
385
385
386
386
The package fires these events:
387
-
-`WebhookCallDispatchedEvent`: the webhook call has been initially dispatched to the queue.
387
+
-`DispatchingWebhookCallEvent`: right before the webhook call will be dispatched to the queue.
388
388
-`WebhookCallSucceededEvent`: the remote app responded with a `2xx` response code.
389
-
-`WebhookCallFailedEvent`: the remote app responded with a non `2xx` response code, or it did not respond at all
389
+
-`WebhookCallFailedEvent`: the remote app responded with a non `2xx` response code, or it did not respond at all.
390
390
-`FinalWebhookCallFailedEvent`: the final attempt to call the webhook failed.
391
391
392
392
All these events have these properties:
@@ -399,7 +399,7 @@ All these events have these properties:
399
399
-`tags`: the array of [tags](#adding-tags) used
400
400
-`uuid`: a unique string to identify this call. This uuid will be the same for all attempts of a webhook call.
401
401
402
-
Except for the `WebhookCallDispatchedEvent`, all events have these additional properties:
402
+
Except for the `DispatchingWebhookCallEvent`, all events have these additional properties:
403
403
404
404
-`attempt`: the attempt number
405
405
-`response`: the response returned by the remote app. Can be an instance of `\GuzzleHttp\Psr7\Response` or `null`.
0 commit comments