Skip to content

Commit bc95bcc

Browse files
committed
Rename addHeader to setHeader
1 parent b73520b commit bc95bcc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

http_client.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ brings most of the available options with type-hinted getters and setters::
152152
->setBaseUri('https://...')
153153
// replaces *all* headers at once, and deletes the headers you do not provide
154154
->setHeaders(['header-name' => 'header-value'])
155-
// add or replace a single header using addHeader()
156-
->addHeader('another-header-name', 'another-header-value')
155+
// set or replace a single header using addHeader()
156+
->setHeader('another-header-name', 'another-header-value')
157157
->toArray()
158158
);
159159

160160
.. versionadded:: 7.1
161161

162-
The :method:`Symfony\\Component\\HttpClient\\HttpOptions::addHeader`
162+
The :method:`Symfony\\Component\\HttpClient\\HttpOptions::setHeader`
163163
method was introduced in Symfony 7.1.
164164

165165
Some options are described in this guide:

0 commit comments

Comments
 (0)