Skip to content

Commit 423e769

Browse files
authored
Use correct name of default headers plugin
1 parent f9cf8e1 commit 423e769

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/headers.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ Header plugins are useful to manage request headers. Many operations are possibl
66
Default headers values
77
----------------------
88

9-
The plugin ``HeaderDefaultPlugin`` allows to set default values for given headers.
9+
The plugin ``HeaderDefaultsPlugin`` allows to set default values for given headers.
1010
That means if a header is not set, it will be added.
1111
However, if the header already is present, the request is left unchanged.
1212

1313
.. code:: php
1414
1515
use Http\Discovery\HttpClientDiscovery;
1616
use Http\Client\Common\PluginClient;
17-
use Http\Client\Common\Plugin\HeaderDefaultPlugin;
17+
use Http\Client\Common\Plugin\HeaderDefaultsPlugin;
1818
1919
$defaultUserAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1';
2020
21-
$headerDefaultPlugin = new HeaderDefaultPlugin([
21+
$headerDefaultsPlugin = new HeaderDefaultsPlugin([
2222
'User-Agent' => $defaultUserAgent
2323
]);
2424
2525
$pluginClient = new PluginClient(
2626
HttpClientDiscovery::find(),
27-
[$headerDefaultPlugin]
27+
[$headerDefaultsPlugin]
2828
);
2929
3030
Mandatory headers values

0 commit comments

Comments
 (0)