@@ -367,7 +367,7 @@ class YourApi extends Api
367367
368368#### ` addPreRequestListener `
369369
370- The ` addPreRequestListener ` method is used to add a function that is called before a request, and all handled data, has been made.
370+ The ` addPreRequestListener ` method is used to add a function that is called before a request has been made.
371371This event listener will be applied to every API request.
372372
373373``` php
@@ -673,8 +673,7 @@ The following list has all the implemented plugins with the respective priority
673673| [ ` LoggerPlugin ` ] ( https://docs.php-http.org/en/latest/plugins/logger.html ) | 8 | only if logger is enabled |
674674
675675For example, if you wanted the client to automatically attempt to re-send a request that failed
676- (due to unreliable connections and servers, for example)
677- you can add the [ RetryPlugin] ( https://docs.php-http.org/en/latest/plugins/retry.html ) ;
676+ (due to unreliable connections and servers, for example) you can add the [ RetryPlugin] ( https://docs.php-http.org/en/latest/plugins/retry.html ) :
678677
679678``` php
680679use ProgrammatorDev\Api\Api;
@@ -687,11 +686,11 @@ class YourApi extends Api
687686 // ...
688687
689688 // if a request fails, it will retry at least 3 times
690- // priority is 12 to execute the plugin between the cache and logger plugins
689+ // priority is 20 to execute before the cache plugin
691690 // (check the above plugin order list for more information)
692691 $this->getClientBuilder()->addPlugin(
693- plugin: new RetryPlugin(['retries' => 3])
694- priority: 12
692+ plugin: new RetryPlugin(['retries' => 3]),
693+ priority: 20
695694 );
696695 }
697696}
@@ -895,7 +894,7 @@ class YourApi extends Api
895894}
896895```
897896
898- For the end user , it should look like this:
897+ When using the API , it should look like this:
899898
900899``` php
901900$api = new YourApi([
0 commit comments