Skip to content

Commit d4cc241

Browse files
authored
Merge pull request #151 from OussamaMater/typos-fix
Corrected typos in README.md and webhook-server.php
2 parents db35a17 + b6ad70a commit d4cc241

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ return [
6363
'headers' => [],
6464

6565
/*
66-
* If a call to a webhook takes longer that this amount of seconds
66+
* If a call to a webhook takes longer this amount of seconds
6767
* the attempt will be considered failed.
6868
*/
6969
'timeout_in_seconds' => 3,
@@ -79,7 +79,7 @@ return [
7979
'backoff_strategy' => \Spatie\WebhookServer\BackoffStrategy\ExponentialBackoffStrategy::class,
8080

8181
/*
82-
* This class is used to dispatch webhooks on to the queue.
82+
* This class is used to dispatch webhooks onto the queue.
8383
*/
8484
'webhook_job' => \Spatie\WebhookServer\CallWebhookJob::class,
8585

@@ -122,7 +122,7 @@ If the receiving app doesn't respond with a response code starting with `2`, the
122122

123123
### Send webhook synchronously
124124

125-
If you would like to call the webhook immediately (synchronously), you may use the dispatchSync method. When using this method, the webhook will not be queued and will be run immediately. This can be helpfull in situation where sending the webhook is part of a bigger job that already has been queued.
125+
If you would like to call the webhook immediately (synchronously), you may use the dispatchSync method. When using this method, the webhook will not be queued and will be run immediately. This can be helpful in situations where sending the webhook is part of a bigger job that already has been queued.
126126

127127
```php
128128
WebhookCall::create()
@@ -132,7 +132,7 @@ WebhookCall::create()
132132

133133
### Conditionally sending webhooks
134134

135-
If you would like to conditionally dispatch a webhook, you may use the `dispatchIf`, `dispatchUnless`, `dispatchSyncIf` and `dispatchSyncUnless` methods:
135+
If you would like to conditionally dispatch a webhook, you may use the `dispatchIf`, `dispatchUnless`, `dispatchSyncIf`, and `dispatchSyncUnless` methods:
136136

137137
```php
138138
WebhookCall::create()
@@ -152,11 +152,11 @@ WebhookCall::create()
152152
->dispatchSyncUnless($condition);
153153
```
154154

155-
### How signing requests works
155+
### How signing requests work
156156

157157
When setting up, it's common to generate, store, and share a secret between your app and the app that wants to receive webhooks. Generating the secret could be done with `Illuminate\Support\Str::random()`, but it's entirely up to you. The package will use the secret to sign a webhook call.
158158

159-
By default, the package will add a header called `Signature` that will contain a signature the receiving app can use the payload hasn't been tampered with. This is how that signature is calculated:
159+
By default, the package will add a header called `Signature` that will contain a signature the receiving app can use if the payload hasn't been tampered with. This is how that signature is calculated:
160160

161161
```php
162162
// payload is the array passed to the `payload` method of the webhook
@@ -169,7 +169,7 @@ $signature = hash_hmac('sha256', $payloadJson, $secret);
169169

170170
### Skip signing request
171171

172-
We don't recommend this, but if you don't want the web hook request to be signed call the `doNotSign` method.
172+
We don't recommend this, but if you don't want the webhook request to be signed call the `doNotSign` method.
173173

174174
```php
175175
WebhookCall::create()
@@ -231,7 +231,7 @@ WebhookCall::create()
231231
->dispatch();
232232
```
233233

234-
To not hammer the remote app we'll wait some time between each attempt. By default, we wait 10 seconds between the first and second attempt, 100 seconds between the third and the fourth, 1000 between the fourth and the fifth and so on. The maximum amount of seconds that we'll wait is 100 000, which is about 27 hours. This behavior is implemented in the default `ExponentialBackoffStrategy`.
234+
To not hammer the remote app we'll wait some time between each attempt. By default, we wait 10 seconds between the first and second attempts, 100 seconds between the third and the fourth, 1000 between the fourth and the fifth, and so on. The maximum amount of seconds that we'll wait is 100 000, which is about 27 hours. This behavior is implemented in the default `ExponentialBackoffStrategy`.
235235

236236
You can define your own backoff strategy by creating a class that implements `Spatie\WebhookServer\BackoffStrategy\BackoffStrategy`. This is what that interface looks like:
237237

@@ -315,7 +315,7 @@ The proxy specification follows the [guzzlehttp proxy format](https://docs.guzzl
315315

316316
### Verifying the SSL certificate of the receiving app
317317

318-
When using an URL that starts with `https://` the package will verify if the SSL certificate of the receiving party is valid. If it is not, we will consider the webhook call failed. We don't recommend this, but you can turn off this verification by setting the `verify_ssl` key in the `webhook-server` config file to `false`.
318+
When using a URL that starts with `https://` the package will verify if the SSL certificate of the receiving party is valid. If it is not, we will consider the webhook call failed. We don't recommend this, but you can turn off this verification by setting the `verify_ssl` key in the `webhook-server` config file to `false`.
319319

320320
You can also disable the verification per webhook call with the `doNotVerifySsl` method.
321321

@@ -371,7 +371,7 @@ or activate the `throw_exception_on_failure` global option of the `webhook-serve
371371

372372
By default, all webhooks will transform the payload into JSON. Instead of sending JSON, you can send any string by using the `sendRawBody(string $body)` option instead.
373373

374-
Due to type mismatch in the Signer API, it is currently not support to sign raw data requests.
374+
Due to a type mismatch in the Signer API, it is currently not supported to sign raw data requests.
375375
When using the _sendRawBody_ option, you will receive a _string_ payload in the WebhookEvents.
376376
```php
377377
WebhookCall::create()

config/webhook-server.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
],
4545

4646
/*
47-
* If a call to a webhook takes longer that this amount of seconds
47+
* If a call to a webhook takes longer this amount of seconds
4848
* the attempt will be considered failed.
4949
*/
5050
'timeout_in_seconds' => 3,
@@ -60,7 +60,7 @@
6060
'backoff_strategy' => \Spatie\WebhookServer\BackoffStrategy\ExponentialBackoffStrategy::class,
6161

6262
/*
63-
* This class is used to dispatch webhooks on to the queue.
63+
* This class is used to dispatch webhooks onto the queue.
6464
*/
6565
'webhook_job' => \Spatie\WebhookServer\CallWebhookJob::class,
6666

0 commit comments

Comments
 (0)