Skip to content

Commit 8778a7c

Browse files
committed
docs: add sub section titles
1 parent d7cbe6f commit 8778a7c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

user_guide_src/source/outgoing/response.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ You can set format an array into either JSON or XML and set the content type hea
4343
Setting Headers
4444
---------------
4545

46+
setHeader()
47+
^^^^^^^^^^^
48+
4649
Often, you will need to set headers to be set for the response. The Response class makes this very simple to do,
4750
with the ``setHeader()`` method.
4851

@@ -54,12 +57,18 @@ which can be either a string or an array of values that will be combined correct
5457
Using these functions instead of using the native PHP functions allows you to ensure that no headers are sent
5558
prematurely, causing errors, and makes testing possible.
5659

60+
appendHeader()
61+
^^^^^^^^^^^^^^
62+
5763
If the header exists and can have more than one value, you may use the ``appendHeader()`` and ``prependHeader()``
5864
methods to add the value to the end or beginning of the values list, respectively. The first parameter is the name
5965
of the header, while the second is the value to append or prepend.
6066

6167
.. literalinclude:: response/005.php
6268

69+
removeHeader()
70+
^^^^^^^^^^^^^^
71+
6372
Headers can be removed from the response with the ``removeHeader()`` method, which takes the header name as the only
6473
parameter. This is not case-sensitive.
6574

0 commit comments

Comments
 (0)