Skip to content

Commit 4e41279

Browse files
committed
docs: add sub sections
1 parent f309d71 commit 4e41279

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

user_guide_src/source/incoming/incomingrequest.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ maintaining the ability to control the order you look for it:
9494
* ``$request->getPostGet()`` - checks ``$_POST`` first, then ``$_GET``
9595
* ``$request->getGetPost()`` - checks ``$_GET`` first, then ``$_POST``
9696

97-
**Getting JSON data**
97+
Getting JSON Data
98+
=================
9899

99100
You can grab the contents of ``php://input`` as a JSON stream with ``getJSON()``.
100101

@@ -112,7 +113,8 @@ The second and third parameters match up to the ``depth`` and ``options`` argume
112113
If the incoming request has a ``CONTENT_TYPE`` header set to "application/json", you can also use ``getVar()`` to get
113114
the JSON stream. Using ``getVar()`` in this way will always return an object.
114115

115-
**Get Specific Data from JSON**
116+
Get Specific Data from JSON
117+
===========================
116118

117119
You can get a specific piece of data from a JSON stream by passing a variable name into ``getVar()`` for the
118120
data that you want or you can use "dot" notation to dig into the JSON to get data that is not on the root level.
@@ -127,7 +129,8 @@ correct ``CONTENT_TYPE`` header.
127129

128130
.. note:: See the documentation for :php:func:`dot_array_search()` in the ``Array`` helper for more information on "dot" notation.
129131

130-
**Retrieving Raw data (PUT, PATCH, DELETE)**
132+
Retrieving Raw data (PUT, PATCH, DELETE)
133+
========================================
131134

132135
Finally, you can grab the contents of php://input as a raw stream with ``getRawInput()``:
133136

@@ -137,7 +140,8 @@ This will retrieve data and convert it to an array. Like this:
137140

138141
.. literalinclude:: incomingrequest/013.php
139142

140-
**Filtering Input Data**
143+
Filtering Input Data
144+
====================
141145

142146
To maintain security of your application, you will want to filter all input as you access it. You can
143147
pass the type of filter to use as the second parameter of any of these methods. The native ``filter_var()``

0 commit comments

Comments
 (0)