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
+7-3Lines changed: 7 additions & 3 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.
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,8 +384,9 @@ WebhookCall::create()
384
384
### Events
385
385
386
386
The package fires these events:
387
+
-`DispatchingWebhookCallEvent`: right before the webhook call will be dispatched to the queue.
387
388
-`WebhookCallSucceededEvent`: the remote app responded with a `2xx` response code.
388
-
-`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.
389
390
-`FinalWebhookCallFailedEvent`: the final attempt to call the webhook failed.
390
391
391
392
All these events have these properties:
@@ -396,9 +397,12 @@ All these events have these properties:
396
397
-`headers`: the headers that were sent. This array includes the signature header
397
398
-`meta`: the array of values passed to the webhook with [the `meta` call](#adding-meta-information)
398
399
-`tags`: the array of [tags](#adding-tags) used
400
+
-`uuid`: a unique string to identify this call. This uuid will be the same for all attempts of a webhook call.
401
+
402
+
Except for the `DispatchingWebhookCallEvent`, all events have these additional properties:
403
+
399
404
-`attempt`: the attempt number
400
405
-`response`: the response returned by the remote app. Can be an instance of `\GuzzleHttp\Psr7\Response` or `null`.
401
-
-`uuid`: a unique string to identify this call. This uuid will be the same for all attempts of a webhook call.
0 commit comments