File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ A library for creating SDKs in PHP with support for:
1010- [ PSR-6 caches] ( https://www.php-fig.org/psr/psr-6 ) ;
1111- [ PSR-3 logs] ( https://www.php-fig.org/psr/psr-3 ) ;
1212- Authentication;
13- - Event Listeners ;
13+ - Event listeners ;
1414- ...and more.
1515
1616## Requirements
@@ -311,9 +311,13 @@ class YourApi extends Api
311311}
312312```
313313
314- ### Events Listeners
314+ ### Event Listeners
315315
316316Currently, there are two event listeners available:
317+ - [ ` addPostRequestHandler ` ] ( #addpostrequesthandler )
318+ - [ ` addResponseContentsHandler ` ] ( #addresponsecontentshandler )
319+
320+ #### ` addPostRequestHandler `
317321
318322The ` addPostRequestHandler ` method is used to add a handler function that is executed after a request has been made.
319323This handler function can be used to inspect the request and response data that was sent to, and received from, the API.
@@ -355,6 +359,8 @@ class YourApi extends Api
355359}
356360```
357361
362+ #### ` addResponseContentsHandler `
363+
358364On the other hand, the ` addResponseContentsHandler ` method is used to manipulate the response that was received from the API.
359365This event listener will be applied to every API request.
360366
You can’t perform that action at this time.
0 commit comments