Skip to content

Commit be45ad7

Browse files
Merge pull request #108 from lboynton/patch-1
Minor fixes to headers documentation
2 parents f9cf8e1 + a274ccb commit be45ad7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

plugins/headers.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@ 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 you to set default values for given headers.
1010
That means if a header is not set, it will be added.
11-
However, if the header already is present, the request is left unchanged.
11+
However, if the header is already 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
3131
------------------------
3232

33-
The plugin ``HeaderSetPlugin`` allows to fix values of given header. That means that any request passing through
34-
this plugin will have the given value for given header.
33+
The plugin ``HeaderSetPlugin`` allows you to fix values of given headers. That means that any request passing through
34+
this plugin will have the given value for the given header.
3535

3636
.. code:: php
3737
@@ -56,7 +56,7 @@ this plugin will have the given value for given header.
5656
Removing headers
5757
----------------
5858

59-
The plugin ``HeaderRemovePlugin`` allows to remove given headers from the request.
59+
The plugin ``HeaderRemovePlugin`` allows you to remove given headers from the request.
6060

6161
.. code:: php
6262
@@ -79,7 +79,7 @@ The plugin ``HeaderRemovePlugin`` allows to remove given headers from the reques
7979
Appending header values
8080
-----------------------
8181

82-
The plugin ``HeaderAppendPlugin`` allows to set headers or to add values to existing headers.
82+
The plugin ``HeaderAppendPlugin`` allows you to set headers or to add values to existing headers.
8383
That means if the request already has the given headers then the value will be appended to the current value
8484
but if the request does not already have the given header, it will be added to the request with the given value.
8585

@@ -108,10 +108,10 @@ but if the request does not already have the given header, it will be added to t
108108
Mixing operations
109109
-----------------
110110

111-
Different header plugins can be mixed to achieve different behaviors
111+
Different header plugins can be mixed together to achieve different behaviors
112112
and you can use the same plugin for identical operations.
113113

114-
The following example will force the ``User-Agent`` and the ``Accept`` header values while removing ``Cookie`` header:
114+
The following example will force the ``User-Agent`` and the ``Accept`` header values while removing the ``Cookie`` header:
115115

116116
.. code:: php
117117

0 commit comments

Comments
 (0)