Maurits van der Schee 5 years ago
parent
commit
43bcccef2b
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      README.md

+ 1
- 1
README.md View File

@@ -782,7 +782,7 @@ You may use the "customization" middleware to modify request and response and im
782 782
         $environment->start = microtime(true);
783 783
     },
784 784
     'customization.afterHandler' => function ($operation, $tableName, $response, $environment) {
785
-        $response->addHeader('X-Time-Taken', microtime(true) - $environment->start);
785
+        return $response->withHeader('X-Time-Taken', microtime(true) - $environment->start);
786 786
     },
787 787
 
788 788
 The above example will add a header "X-Time-Taken" with the number of seconds the API call has taken.

Loading…
Cancel
Save