@@ -23,6 +23,9 @@ Breaking Changes
23
23
Lowercase HTTP Method Name
24
24
==========================
25
25
26
+ Request::getMethod()
27
+ --------------------
28
+
26
29
For historical reasons, ``Request::getMethod() `` returned HTTP method names in
27
30
lower case by default.
28
31
@@ -39,14 +42,34 @@ If you want lowercase HTTP method names, use PHP's ``strtolower()`` function::
39
42
40
43
strtolower($request->getMethod())
41
44
42
- And you should use uppercase HTTP method names in your app code. You should update
43
- the keys in ``$methods `` in **app/Config/Filters.php **::
45
+ And you should use uppercase HTTP method names in your app code.
46
+
47
+ app/Config/Filters.php
48
+ ----------------------
49
+
50
+ You should update the keys in ``$methods `` in **app/Config/Filters.php **::
44
51
45
52
public array $methods = [
46
53
'POST' => ['invalidchars', 'csrf'],
47
54
'GET' => ['csrf'],
48
55
];
49
56
57
+ CURLRequest::request()
58
+ ----------------------
59
+
60
+ In previous versions, you could pass lowercase HTTP methods to the ``request() ``
61
+ method. But this bug has been fixed.
62
+
63
+ Now you must pass the correct HTTP method names like "GET", "POST". Otherwise
64
+ you would get the error response::
65
+
66
+ $client = \Config\Services::curlrequest();
67
+ $response = $client->request('get', 'https://www.google.com/', [
68
+ 'http_errors' => false
69
+ ]);
70
+ $response->getStatusCode(); // In previous versions: 200
71
+ // In this verrsion: 405
72
+
50
73
.. _upgrade-450-nested-route-groups-and-options :
51
74
52
75
Nested Route Groups and Options
0 commit comments