Skip to content

Commit 0e10ab7

Browse files
committed
docs: clarify QUERY method usage
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent fde2575 commit 0e10ab7

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

user_guide_src/source/incoming/routing.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,17 @@ You can use any standard HTTP verb (GET, POST, PUT, DELETE, OPTIONS, etc):
7979
.. literalinclude:: routing/003.php
8080

8181
``QUERY`` routes are for the HTTP QUERY method defined by RFC 10008.
82-
QUERY requests are safe and idempotent like GET, but send query content in the
82+
``QUERY`` requests are safe and idempotent like GET, but send query content in the
8383
request body. Read that body explicitly with request input methods such as
8484
``$this->request->input()->json()`` or ``$this->request->input()->raw()``. Your
8585
controller should reject missing or unsupported ``Content-Type`` values for the
86-
query content it expects.
86+
query content it expects. Do not use ``QUERY`` for operations that create,
87+
update, delete, or otherwise change server state.
8788

8889
.. note:: Your web server, proxy, or CORS configuration may need to allow the
89-
``QUERY`` method before these requests can reach CodeIgniter.
90+
``QUERY`` method before these requests can reach CodeIgniter. For
91+
browser-based cross-origin requests, ensure ``QUERY`` is included in your
92+
allowed CORS methods so preflight requests can succeed.
9093

9194
You can supply multiple verbs that a route should match by passing them in as an array to the ``match()`` method:
9295

0 commit comments

Comments
 (0)