We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff29545 commit 4ec1166Copy full SHA for 4ec1166
README.md
@@ -2391,12 +2391,7 @@ add a request header for all following requests.
2391
```php
2392
$browser = $browser->withHeader('User-Agent', 'ACME');
2393
2394
-$browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
2395
- //will contain the header User-Agent with the value ACME
2396
- var_dump($response);
2397
-}, function (Exception $e) {
2398
- echo 'Error: ' . $e->getMessage() . PHP_EOL;
2399
-});
+$browser->get($url)->then(…);
2400
```
2401
2402
Note that the new header will overwrite any headers previously set with
0 commit comments