You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/changelogs/v4.2.0.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,7 @@ Commands
118
118
Others
119
119
======
120
120
121
+
- Added ``$this->validateData()`` in Controller. See :ref:`controller-validatedata`.
121
122
- Content Security Policy (CSP) enhancements
122
123
- Added the configs ``$scriptNonceTag`` and ``$styleNonceTag`` in ``Config\ContentSecurityPolicy`` to customize the CSP placeholders (``{csp-script-nonce}`` and ``{csp-style-nonce}``)
123
124
- Added the config ``$autoNonce`` in ``Config\ContentSecurityPolicy`` to disable the CSP placeholder replacement
Copy file name to clipboardExpand all lines: user_guide_src/source/incoming/incomingrequest.rst
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,12 +80,14 @@ With CodeIgniter's built-in methods you can simply do this:
80
80
81
81
.. literalinclude:: incomingrequest/008.php
82
82
83
+
.. _incomingrequest-getting-data:
84
+
83
85
Getting Data
84
86
============
85
87
86
88
The ``getVar()`` method will pull from ``$_REQUEST``, so will return any data from ``$_GET``, ``$POST``, or ``$_COOKIE`` (depending on php.ini `request-order <https://www.php.net/manual/en/ini.core.php#ini.request-order>`_).
87
89
88
-
.. note:: If the incoming request has a ``CONTENT_TYPE`` header set to ``application/json``,
90
+
.. note:: If the incoming request has a ``Content-Type`` header set to ``application/json``,
89
91
the ``getVar()`` method returns the JSON data instead of ``$_REQUEST`` data.
90
92
91
93
While this
@@ -103,6 +105,8 @@ maintaining the ability to control the order you look for it:
103
105
* ``$request->getPostGet()`` - checks ``$_POST`` first, then ``$_GET``
104
106
* ``$request->getGetPost()`` - checks ``$_GET`` first, then ``$_POST``
105
107
108
+
.. _incomingrequest-getting-json-data:
109
+
106
110
Getting JSON Data
107
111
=================
108
112
@@ -119,7 +123,7 @@ arrays, pass in ``true`` as the first parameter.
119
123
The second and third parameters match up to the ``depth`` and ``options`` arguments of the
0 commit comments